
The MICRONS project collected a large scale functional imaging experiment from the mouse before it went through processing for electron microscopy. This notebook will teach you how to access that data and link it to the structural measurements in the electron microscopy portion of the dataset.
The functional data is stored in a framework called DataJoint which is backed by MySql. DataJoint is a free, open-source framework for programming scientific databases and computational data pipelines that was developed by the Tolias Lab, and now as a for profit company. It should be pre-installed in your environment, and the json file 'dj_local_conf.json' in this folder contains the configuration about connecting to the server for you for the course. We will utilize a module called **phase3.nda**, which refers to the Microns phase 3 neural data api) to connect to the DataJoint server. The **phase3.nda** module has a module a series of tables which provide information about the functional imaging experiment, including neural activity (masks and fluorescence traces), the stimulus, the animal's behavior (running and pupil). Ultimately the functional activity of individual regions of interest is stored in the "ScanUnit" table, which can then be linked to neurons in the electron microscopy dataset via the "functional_coreg" CAVE table, which contains primary keys of that table. Outside of the course you must download this server and run it somewhere to access the data. Instructions for this can be found here. Additional documentation about the functional data and links to technical information about the dataset are here. This notebook is based on the original example notebooks provided in that repository, created by members of Andreas Tolias and Jake Reimer's groups at Baylor who created and prepared the dataset for release
to access these tables with datajoint you have to import phase3.nda, which is the primary functional data access module. We will also import phase3.func which has some helper functions for you to use, which simply use phase3.nda under the hood.
nda.Scan: Scans are collections of frames that were acquired simultaneously. They are defined by a combination of session and scan index. Information on completed scans. Cajal Pipeline: meso.ScanInfo.
nda.ScanInclude: Scans determined suitable for analysis. Some scans did not complete successfully or had incomplete data, and so are not reccomended.
nda.Field: Individual fields of scans. Fields are single image planes. Each scan contains up to 8 fields. See here for a visualization of the scans to understand how the fields are distributed Cajal Pipeline: meso.ScanInfo.Field. On each frame of the scan, the microscope scanned one field, then hopped to the next field, and so on ina loop. So the individual 8 frames are spread out across the inter-scan frame time. All 8 frames were imaged within the 6.3Hz acquisition rate.
nda.Segmentation: CNMF segmentation of a field using CaImAn package (https://github.com/simonsfoundation/CaImAn). It records the masks of all segmented cells. Mask_id's are unique per field.
Cajal Pipeline: meso.Segmentation.Mask
nda.Fluorescence: Records the raw fluorescence traces for each segmented mask.
Cajal Pipeline: meso.Fluorescence.Trace
nda.ScanUnit: Unit_id assignment that is unique across the entire scan. Includes info about each unit.
Cajal Pipeline: meso.ScanSet.Unit / meso.ScanSet.UnitInfo
nda.MaskClassification: Classification of segmented masks into soma or artifact. Uses CaImAn package (https://github.com/simonsfoundation/CaImAn).
Cajal Pipeline: meso.MaskClassification.Type
nda.Activity: Deconvolved spike trace from the fluorescence trace.
Cajal Pipeline: meso.Activity.Trace
nda.Oracle: Measures how reliably each ScanUnit responds to visual stimulus Leave-one-out correlation for repeated videos in stimulus.
nda.AreaMembership: Visual area labels for all units.
nda.FrameTimes: Timestamps of scan frames in seconds relative to the start of the scan for the first pixel of the first imaging field. You can use this to get a precise timing of each unit in a consistent timebase.
nda.Stimulus: For each scan, contains the movie aligned to activity traces in nda.Activity. Note, this movie is now temporly downsampled to match the acquisition rate of the activity, but does NOT reflect the temporal properties of the stimulus that was actually shown to the animal. You have to download the actual stimulus movie at 30Hz if you want precise temporarily correct information about the pixels shown to the mouse during the scan. (see below)
nda.Trial: Contains information for each trial of the movie in nda.Stimulus. There are three types of trials, Clip, Monet2, and Trippy. Each unique trial has its own condition_hash. To get detailed information for each trial stimulus, join each condition_hash according to its corresponding type in one of: nda.Clip, nda.Monet2, or nda.Trippy.
nda.Clip: Detailed information for movie clips.
nda.Monet2: Detailed information for the Monet2 stimulus.
nda.Trippy: Detailed information for the Trippy stimulus.
nda.RawManualPupil: Pupil traces for each scan from the left eye collected at ~20 Hz and semi-automatically segmented.
nda.ManualPupil: Manual pupil traces low-pass filtered with a hamming window to the scan frame rate and linearly interpolated to scan frame times.
nda.RawTreadmill: Cylindrical treadmill rostral-caudal position extracted with a rotary optical encoder at ~100Hz and converted into velocity.
nda.Treadmill: Treadmill velocities low-pass filtered with a hamming window to the scan frame rate then linearly interpolated to scan frame times.
nda.MeanIntensity: Mean intensity of imaging field over time.
Cajal Pipeline: meso.Quality.MeanIntensity
nda.SummaryImages: Reference images of the scan field.
Cajal Pipeline: meso.SummaryImages
nda.Stack: High-res anatomical stack information.
Cajal Pipeline: stack.CorrectedStack
nda.Registration: Parameters of the affine matrix learned for field registration into the stack.
Cajal Pipeline: stack.Registration.Affine
nda.Coregistration: Coregistration transform solutions from the Allen Institute. em_coregistration
nda.StackUnit: Unit coordinates in stack reference frame after field registration. np_x, np_y, np_z should be used for transformation to EM space using Coregistration. meso.StackCoordinates.UnitInfo
%%capture
from phase3 import nda, func
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np

nda.Scan()
| session Session ID | scan_idx Scan ID | nframes number of frames per scan | nfields number of fields per scan | fps frames per second (Hz) |
|---|---|---|---|---|
| 4 | 7 | 40000 | 8 | 6.3009 |
| 4 | 9 | 35112 | 8 | 6.3009 |
| 4 | 10 | 40000 | 8 | 6.3009 |
| 5 | 3 | 40000 | 8 | 6.3009 |
| 5 | 6 | 40000 | 8 | 6.3009 |
| 5 | 7 | 40000 | 8 | 6.3009 |
| 6 | 2 | 40000 | 8 | 6.3009 |
| 6 | 4 | 40000 | 8 | 6.3009 |
| 6 | 6 | 40000 | 8 | 6.3009 |
| 6 | 7 | 40000 | 8 | 6.3009 |
| 7 | 3 | 40000 | 8 | 6.3009 |
| 7 | 4 | 40000 | 8 | 6.3009 |
...
Total: 19
pd.DataFrame(nda.Scan())
| session | scan_idx | nframes | nfields | fps | |
|---|---|---|---|---|---|
| 0 | 4 | 7 | 40000 | 8 | 6.30090 |
| 1 | 4 | 9 | 35112 | 8 | 6.30090 |
| 2 | 4 | 10 | 40000 | 8 | 6.30090 |
| 3 | 5 | 3 | 40000 | 8 | 6.30090 |
| 4 | 5 | 6 | 40000 | 8 | 6.30090 |
| 5 | 5 | 7 | 40000 | 8 | 6.30090 |
| 6 | 6 | 2 | 40000 | 8 | 6.30090 |
| 7 | 6 | 4 | 40000 | 8 | 6.30090 |
| 8 | 6 | 6 | 40000 | 8 | 6.30090 |
| 9 | 6 | 7 | 40000 | 8 | 6.30090 |
| 10 | 7 | 3 | 40000 | 8 | 6.30090 |
| 11 | 7 | 4 | 40000 | 8 | 6.30090 |
| 12 | 7 | 5 | 40000 | 8 | 6.30090 |
| 13 | 8 | 5 | 40000 | 8 | 6.30090 |
| 14 | 8 | 7 | 40000 | 8 | 6.30090 |
| 15 | 8 | 9 | 40000 | 8 | 6.30090 |
| 16 | 9 | 3 | 50000 | 6 | 8.61754 |
| 17 | 9 | 4 | 50000 | 6 | 8.61754 |
| 18 | 9 | 6 | 57000 | 4 | 9.62246 |
[*nda.Scan.heading.primary_key] # primary keys
['session', 'scan_idx']
scan_key = {'session': 4, 'scan_idx': 7}
pd.DataFrame(nda.Scan & scan_key)
| session | scan_idx | nframes | nfields | fps | |
|---|---|---|---|---|---|
| 0 | 4 | 7 | 40000 | 8 | 6.3009 |
Task 1.1: Pick out a different scan session
my_scan_key = {'session': 6, 'scan_idx': 7}
my_scan = pd.DataFrame(nda.Scan & my_scan_key)
my_scan
| session | scan_idx | nframes | nfields | fps | |
|---|---|---|---|---|---|
| 0 | 6 | 7 | 40000 | 8 | 6.3009 |
scan_keys = [{'session': 4, 'scan_idx': 7}, {'session': 5, 'scan_idx': 3}]
scan_res=pd.DataFrame(nda.Scan & scan_keys)
scan_res
| session | scan_idx | nframes | nfields | fps | |
|---|---|---|---|---|---|
| 0 | 4 | 7 | 40000 | 8 | 6.3009 |
| 1 | 5 | 3 | 40000 | 8 | 6.3009 |
# here '&' filters out Scans to only include those
# that completed successfully
pd.DataFrame(nda.Scan & nda.ScanInclude)
| session | scan_idx | nframes | nfields | fps | |
|---|---|---|---|---|---|
| 0 | 4 | 7 | 40000 | 8 | 6.30090 |
| 1 | 5 | 6 | 40000 | 8 | 6.30090 |
| 2 | 5 | 7 | 40000 | 8 | 6.30090 |
| 3 | 6 | 2 | 40000 | 8 | 6.30090 |
| 4 | 6 | 4 | 40000 | 8 | 6.30090 |
| 5 | 6 | 6 | 40000 | 8 | 6.30090 |
| 6 | 6 | 7 | 40000 | 8 | 6.30090 |
| 7 | 7 | 3 | 40000 | 8 | 6.30090 |
| 8 | 7 | 4 | 40000 | 8 | 6.30090 |
| 9 | 7 | 5 | 40000 | 8 | 6.30090 |
| 10 | 8 | 5 | 40000 | 8 | 6.30090 |
| 11 | 9 | 3 | 50000 | 6 | 8.61754 |
| 12 | 9 | 4 | 50000 | 6 | 8.61754 |
| 13 | 9 | 6 | 57000 | 4 | 9.62246 |
# note that even though scan_key only has one entry
# there are multiple fields that match, so the filter
# returns all of them
nda.Field & scan_key
| session Session ID | scan_idx Scan ID | field Field Number | px_width field pixels per line | px_height lines per field | um_width field width (microns) | um_height field height (microns) | field_x field x motor coordinates (microns) | field_y field y motor coordinates (microns) | field_z field z motor coordinates (microns) |
|---|---|---|---|---|---|---|---|---|---|
| 4 | 7 | 1 | 248 | 440 | 620.0 | 1100.0 | -485.0 | -235.0 | 80.0 |
| 4 | 7 | 2 | 248 | 440 | 620.0 | 1100.0 | 95.0 | -235.0 | 80.0 |
| 4 | 7 | 3 | 248 | 440 | 620.0 | 1100.0 | -485.0 | -235.0 | 220.0 |
| 4 | 7 | 4 | 248 | 440 | 620.0 | 1100.0 | 95.0 | -235.0 | 220.0 |
| 4 | 7 | 5 | 248 | 440 | 620.0 | 1100.0 | -485.0 | -235.0 | 360.0 |
| 4 | 7 | 6 | 248 | 440 | 620.0 | 1100.0 | 95.0 | -235.0 | 360.0 |
| 4 | 7 | 7 | 248 | 440 | 620.0 | 1100.0 | -485.0 | -235.0 | 500.0 |
| 4 | 7 | 8 | 248 | 440 | 620.0 | 1100.0 | 95.0 | -235.0 | 500.0 |
Total: 8
field_key = {'session': 4, 'scan_idx': 7, 'field': 4}
nda.Field & field_key
| session Session ID | scan_idx Scan ID | field Field Number | px_width field pixels per line | px_height lines per field | um_width field width (microns) | um_height field height (microns) | field_x field x motor coordinates (microns) | field_y field y motor coordinates (microns) | field_z field z motor coordinates (microns) |
|---|---|---|---|---|---|---|---|---|---|
| 4 | 7 | 4 | 248 | 440 | 620.0 | 1100.0 | 95.0 | -235.0 | 220.0 |
Total: 1
Task 1.2: Find the fields in the scan you picked that have z coordinates less than 200 um? Hint, you don't have to specify all parts of the primary key to still have filter work
pd.DataFrame(nda.Field & my_scan_key).query('field_z<200')
| session | scan_idx | field | px_width | px_height | um_width | um_height | field_x | field_y | field_z | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 6 | 7 | 1 | 248 | 440 | 620.0 | 1100.0 | -520.0 | -280.0 | 100.0 |
| 1 | 6 | 7 | 2 | 248 | 440 | 620.0 | 1100.0 | 60.0 | -280.0 | 100.0 |
# first lets grab all the fields from included scans
fields=pd.DataFrame(nda.Field & nda.ScanInclude)
fields.groupby(['session', 'scan_idx']).field.count()
session scan_idx
4 7 8
5 6 8
7 8
6 2 8
4 8
6 8
7 8
7 3 8
4 8
5 8
8 5 8
9 3 6
4 6
6 4
Name: field, dtype: int64
Task 1.3: Make a list called scans with all the scan keys. How many unique scans are in this list of included fields?
scans = fields.groupby(['session', 'scan_idx']).groups.keys()
len(scans)
14
# we need 14 colors, matplotlib standard palette has 10, so we will add 4 more
import matplotlib.colors as mcolors
colors = list(mcolors.TABLEAU_COLORS.keys()) + ['mediumblue', 'greenyellow',
'peachpuff', 'darkcyan' ]
len(colors)
14
# now lets construct a dictionary where the key is the
# combination of session, scan_idx and the color string is value
scan_colors_dict = {f:c for f,c in zip(scans, colors)}
scan_colors_dict
{(4, 7): 'tab:blue',
(5, 6): 'tab:orange',
(5, 7): 'tab:green',
(6, 2): 'tab:red',
(6, 4): 'tab:purple',
(6, 6): 'tab:brown',
(6, 7): 'tab:pink',
(7, 3): 'tab:gray',
(7, 4): 'tab:olive',
(7, 5): 'tab:cyan',
(8, 5): 'mediumblue',
(9, 3): 'greenyellow',
(9, 4): 'peachpuff',
(9, 6): 'darkcyan'}
# one subplot for x,z and one for y,z
f, ax = plt.subplots(2,1,figsize=(8,8))
for k, row in fields.iterrows():
# now we can plot these as individual lines, and use our color dictionary
# to color them
# line for the x,z view
linex = plt.Line2D([row.field_x - row.um_width/2, row.field_x+row.um_width/2],
[row.field_z, row.field_z], linewidth=3, alpha=.2,
color=scan_colors_dict[(row.session, row.scan_idx)])
# line for the y,z view
liney = plt.Line2D([row.field_y - row.um_height/2, row.field_y+row.um_height/2],
[row.field_z, row.field_z], linewidth=3, alpha=.2,
color=scan_colors_dict[(row.session, row.scan_idx)])
ax[0].add_line(linex)
ax[1].add_line(liney)
# # uncomment to overlay text of field numbers
# text = plt.Text(x=row.field_x, y=row.field_z, text=f'{int(row.field)}')
# texty = plt.Text(x=row.field_y-(20*int(row.field%2)), y=row.field_z, text=f'{int(row.field)}')
# ax[0].add_artist(text)
# ax[1].add_artist(texty)
# when using raw lines you have to set axis
ax[0].set_xlim(-900,500)
ax[0].set_ylim(650,0)
ax[0].set_aspect('equal')
ax[0].set_xlabel('+posterior ($\mu m$)')
ax[0].set_ylabel('depth ($\mu m$)')
ax[1].set_xlim(-900,400)
ax[1].set_ylim(650,0)
ax[1].set_aspect('equal')
ax[1].set_xlabel('+lateral ($\mu m$)')
ax[1].set_ylabel('depth ($\mu m$)')
Text(0, 0.5, 'depth ($\\mu m$)')
nda.FrameTimes() & scan_key
| session Session ID | scan_idx Scan ID | frame_times stimulus frame times for the first pixel of field 1 of each scan (len = nframes) | ndepths number of imaging depths recorded for each scan |
|---|---|---|---|
| 4 | 7 | =BLOB= | 4 |
Total: 1
frame_times = pd.DataFrame(nda.FrameTimes & scan_key)['frame_times'].values[0]
len(frame_times)
40000
Task 1.4: Plot when these frametimes occur as a raster
f ,ax = plt.subplots()
ax.eventplot(frame_times)
ax.set_xlim(-1,3)
(-1.0, 3.0)
fps = pd.DataFrame(nda.Scan & scan_key).loc[0,'fps']
fps
6.3009
Task 1.5: Calculate the average and std between these frametimes
(1 / np.diff(frame_times)).mean() # average frequency of timestamps
6.298454818003098
np.diff(frame_times).std() # average frequency of timestamps
0.0003568082788071831
nda.Stimulus()
| session Session ID | scan_idx Scan ID | movie stimulus images synchronized with field 1 frame times (H x W x T matrix) |
|---|---|---|
| 4 | 7 | =BLOB= |
| 4 | 9 | =BLOB= |
| 4 | 10 | =BLOB= |
| 5 | 3 | =BLOB= |
| 5 | 6 | =BLOB= |
| 5 | 7 | =BLOB= |
| 6 | 2 | =BLOB= |
| 6 | 4 | =BLOB= |
| 6 | 6 | =BLOB= |
| 6 | 7 | =BLOB= |
| 7 | 3 | =BLOB= |
| 7 | 4 | =BLOB= |
...
Total: 19
movie = (nda.Stimulus & scan_key).fetch1('movie') # stimulus images synchronized with nda.FrameTimes
movie.shape #(height x width x frames)
(90, 160, 40000)
Task 1.5: Look at one of the frames of this stimulus
f, ax = plt.subplots()
ax.imshow(movie[:,:,12000], cmap=plt.cm.gray)
<matplotlib.image.AxesImage at 0x7fc62ad524f0>
trial_df = pd.DataFrame(nda.Trial & scan_key)
trial_df
| session | scan_idx | trial_idx | type | start_idx | end_idx | start_frame_time | end_frame_time | frame_times | condition_hash | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 4 | 7 | 0 | stimulus.Clip | 55 | 118 | 8.697065 | 18.663578 | [8.697064569452493, 8.730412414530008, 8.76373... | JEL5/i5FccX4ykUOKaDW |
| 1 | 4 | 7 | 1 | stimulus.Clip | 119 | 182 | 18.763564 | 28.730076 | [18.763563802698343, 18.796907356241434, 18.83... | AAQ1HNKGrg1cIXlMw7nz |
| 2 | 4 | 7 | 2 | stimulus.Clip | 182 | 245 | 28.830070 | 38.796571 | [28.830070426920145, 28.86340229795286, 28.896... | ksTS42zV+O0YJqa0+s4Y |
| 3 | 4 | 7 | 3 | stimulus.Clip | 246 | 308 | 38.896565 | 48.863070 | [38.89656536863157, 38.92988865659544, 38.9632... | m5JLObtSRnbRKw1ukcSE |
| 4 | 4 | 7 | 4 | stimulus.Clip | 309 | 372 | 48.963060 | 58.929562 | [48.963060310342996, 48.996388843515604, 49.02... | L8Z/mji+v1WipuJe4GaL |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 459 | 4 | 7 | 459 | stimulus.Clip | 31548 | 31611 | 5008.780256 | 5018.746762 | [5008.780256441096, 5008.813589504221, 5008.84... | owkBHih6INnj1E45lT8d |
| 460 | 4 | 7 | 460 | stimulus.Trippy | 31612 | 31706 | 5018.846758 | 5033.829829 | [5018.846758296946, 5018.863422325114, 5018.88... | 5/1FqWTahoTvRpmjfXdl |
| 461 | 4 | 7 | 461 | stimulus.Trippy | 31707 | 31801 | 5033.913160 | 5048.896257 | [5033.91316049383, 5033.929828336695, 5033.946... | +4gByvU9LfvSD0JHP6Ae |
| 462 | 4 | 7 | 462 | stimulus.Trippy | 31801 | 31896 | 5048.979574 | 5063.962665 | [5048.979574373225, 5048.996248414973, 5049.01... | S3YyVltepwIk1BYeNSvC |
| 463 | 4 | 7 | 463 | stimulus.Trippy | 31896 | 31991 | 5064.045994 | 5079.029088 | [5064.045994451502, 5064.062659433344, 5064.07... | EhwIk1vM51LHZPE6xFZX |
464 rows × 10 columns
Task 1.7: How many trial types are there? And how many total trials?
trial_df.type.value_counts()
stimulus.Clip 384 stimulus.Monet2 40 stimulus.Trippy 40 Name: type, dtype: int64
len(trial_df)
464
Task 1.8: How many times was each unique stimulus shown? (save this as a dataframe)
n_stimulus_df = trial_df.groupby('condition_hash').session.count()
n_stimulus_df.sort_values(ascending=False)
condition_hash
5zQTb77qI+ig8rigx1XU 10
ecUQJtcERZJGdqza1k7h 10
GjCMo2GkJp6y5vricadg 10
7UETOWO5Z8aWuHDBJ2GG 10
Oup5uAZxF2G7zEJkT+ui 10
..
DCM6Wd1w6zoYhtjnrQal 1
D3JX/fT6PFESorDVkSNi 1
aAFp4NDz9KOYeXAukger 1
aEAvIEfOqtneG1jn9rtY 1
U+1qcBHNmS5KSpBpTbu1 1
Name: session, Length: 280, dtype: int64
Task 1.9: What are the hashes for the stimuli that are repeated 10 times?
n_stimulus_df[n_stimulus_df>9]
condition_hash 5zQTb77qI+ig8rigx1XU 10 7UETOWO5Z8aWuHDBJ2GG 10 GjCMo2GkJp6y5vricadg 10 KXdTNAGMo1gCWz2Ge8zr 10 Oup5uAZxF2G7zEJkT+ui 10 ecUQJtcERZJGdqza1k7h 10 Name: session, dtype: int64
Task 1.10: Do the same thing for a different scan, and then figure out how many stimuli were presented in both scans? hint: you can do merge using a series, if you want to use the index to merge, use left/right_index=True.
trial2_df = pd.DataFrame(nda.Trial & my_scan_key)
n_stimulus_df2 = trial2_df.groupby('condition_hash').session.count()
stim_merge_df=pd.merge(n_stimulus_df, n_stimulus_df2, how='inner', left_index=True, right_index=True)
stim_merge_df
| session_x | session_y | |
|---|---|---|
| condition_hash | ||
| +4gByvU9LfvSD0JHP6Ae | 2 | 2 |
| +rgSVBVRE8Ij1WNhq8ZW | 2 | 2 |
| 0JcYLY6eaQxNgD0AqyHf | 2 | 2 |
| 0eP/PPhAGmbJ2peZOa/E | 2 | 2 |
| 0ir9/br3yxbe2BBf65zF | 2 | 2 |
| ... | ... | ... |
| yfFAPn1QpVQmEC2iXg07 | 2 | 2 |
| ysjy6YgGXX5+mcx52KSM | 2 | 2 |
| yv/S61fYnDSQcA9J6Nk8 | 2 | 2 |
| zcz9H/fzww6BdAJTTzoe | 2 | 2 |
| zlQ935qW1A8YOiseS7gY | 2 | 2 |
116 rows × 2 columns
trial_key = {'session': 4, 'scan_idx': 7, 'trial_idx': 8}
trial_info = nda.Trial & trial_key
trial_info
| session Session ID | scan_idx Scan ID | trial_idx index of trial within stimulus | type type of stimulus trial | start_idx index of field 1 scan frame at start of trial | end_idx index of field 1 scan frame at end of trial | start_frame_time start time of stimulus frame relative to scan start (seconds) | end_frame_time end time of stimulus frame relative to scan start (seconds) | frame_times full vector of stimulus frame times relative to scan start (seconds) | condition_hash 120-bit hash (The first 20 chars of MD5 in base64) |
|---|---|---|---|---|---|---|---|---|---|
| 4 | 7 | 8 | stimulus.Monet2 | 626 | 720 | 99.24554627225706 | 114.22863238141844 | =BLOB= | GHn0W57E+2PS+Qr5yD2r |
Total: 1
trial_info * nda.Monet2
| session Session ID | scan_idx Scan ID | trial_idx index of trial within stimulus | condition_hash 120-bit hash (The first 20 chars of MD5 in base64) | type type of stimulus trial | start_idx index of field 1 scan frame at start of trial | end_idx index of field 1 scan frame at end of trial | start_frame_time start time of stimulus frame relative to scan start (seconds) | end_frame_time end time of stimulus frame relative to scan start (seconds) | frame_times full vector of stimulus frame times relative to scan start (seconds) | fps display refresh rate | duration (s) trial duration | rng_seed random number generator seed | blue_green_saturation 0 = grayscale, 1=blue/green | pattern_width width of generated pattern | pattern_aspect the aspect ratio of the pattern | temp_kernel | temp_bandwidth (Hz) temporal bandwidth of the stimulus | ori_coherence 1=unoriented noise. pi/ori_coherence = bandwidth of orientations. | ori_fraction fraction of time coherent orientation is on | ori_mix mixin-coefficient of orientation biased noise | n_dirs number of directions | speed unit/s motion component, where unit is display width | directions computed directions of motion in degrees | onsets computed direction onset (seconds) | movie rendered uint8 movie (H X W X 1 X T) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 | 7 | 8 | GHn0W57E+2PS+Qr5yD2r | stimulus.Monet2 | 626 | 720 | 99.24554627225706 | 114.22863238141844 | =BLOB= | 60.000 | 15.000 | 8.0 | 0.000 | 72 | 1.7 | hamming | 4.00 | 2.50 | 1.0 | 1.0 | 16 | 0.2 | =BLOB= | =BLOB= | =BLOB= |
Total: 1
monet_info=trial_info * nda.Monet2
mov_frame_times = monet_info.fetch1('frame_times')
mov = monet_info.fetch1('movie')
1/np.diff(mov_frame_times).mean()
60.000990013019305
mov.shape
(126, 216, 1, 900)
offset = 45
skips = 5
fig, axs = plt.subplots(1, 8, dpi=150, figsize=(16,4))
for n in range(8):
axs[n].imshow(mov[:,:,0,n*skips+offset], cmap='gray')
[ax.axis('off') for ax in axs.ravel()];
directions, onsets = monet_info.fetch1('directions', 'onsets')
directions_df = pd.DataFrame({'onset': onsets[0,:], 'direction':directions[0,:]})
duration = float(monet_info.fetch1('duration'))
offsets = np.concatenate([directions_df['onset'][1:],[duration]])
directions_df['offset']=offsets
directions_df
| onset | direction | offset | |
|---|---|---|---|
| 0 | 0.0000 | 202.5 | 0.9375 |
| 1 | 0.9375 | 90.0 | 1.8750 |
| 2 | 1.8750 | 180.0 | 2.8125 |
| 3 | 2.8125 | 45.0 | 3.7500 |
| 4 | 3.7500 | 67.5 | 4.6875 |
| 5 | 4.6875 | 315.0 | 5.6250 |
| 6 | 5.6250 | 22.5 | 6.5625 |
| 7 | 6.5625 | 225.0 | 7.5000 |
| 8 | 7.5000 | 292.5 | 8.4375 |
| 9 | 8.4375 | 270.0 | 9.3750 |
| 10 | 9.3750 | 337.5 | 10.3125 |
| 11 | 10.3125 | 112.5 | 11.2500 |
| 12 | 11.2500 | 157.5 | 12.1875 |
| 13 | 12.1875 | 0.0 | 13.1250 |
| 14 | 13.1250 | 247.5 | 14.0625 |
| 15 | 14.0625 | 135.0 | 15.0000 |
Task 1.11: At what time in the scan did this Trial start showing a 315 degree oriented stimulus?
directions_df.query('direction==315').onset +trial_info.fetch('start_frame_time')
5 103.933046 Name: onset, dtype: float64
directions_df['onset_time']=directions_df['onset']+monet_info.fetch1('start_frame_time')
directions_df['offset_time']=directions_df['offset']+monet_info.fetch1('start_frame_time')
directions_df['onset_frame_number']=np.searchsorted(frame_times, directions_df.onset_time)
directions_df['offset_frame_number']=np.searchsorted(frame_times, directions_df.offset_time)
# sort the times with respect to directions
directions_df.sort_values('direction', inplace=True)
directions_df
| onset | direction | offset | onset_time | offset_time | onset_frame_number | offset_frame_number | |
|---|---|---|---|---|---|---|---|
| 13 | 12.1875 | 0.0 | 13.1250 | 111.433046 | 112.370546 | 703 | 708 |
| 6 | 5.6250 | 22.5 | 6.5625 | 104.870546 | 105.808046 | 661 | 667 |
| 3 | 2.8125 | 45.0 | 3.7500 | 102.058046 | 102.995546 | 643 | 649 |
| 4 | 3.7500 | 67.5 | 4.6875 | 102.995546 | 103.933046 | 649 | 655 |
| 1 | 0.9375 | 90.0 | 1.8750 | 100.183046 | 101.120546 | 632 | 638 |
| 11 | 10.3125 | 112.5 | 11.2500 | 109.558046 | 110.495546 | 691 | 697 |
| 15 | 14.0625 | 135.0 | 15.0000 | 113.308046 | 114.245546 | 714 | 720 |
| 12 | 11.2500 | 157.5 | 12.1875 | 110.495546 | 111.433046 | 697 | 703 |
| 2 | 1.8750 | 180.0 | 2.8125 | 101.120546 | 102.058046 | 638 | 643 |
| 0 | 0.0000 | 202.5 | 0.9375 | 99.245546 | 100.183046 | 626 | 632 |
| 7 | 6.5625 | 225.0 | 7.5000 | 105.808046 | 106.745546 | 667 | 673 |
| 14 | 13.1250 | 247.5 | 14.0625 | 112.370546 | 113.308046 | 708 | 714 |
| 9 | 8.4375 | 270.0 | 9.3750 | 107.683046 | 108.620546 | 679 | 685 |
| 8 | 7.5000 | 292.5 | 8.4375 | 106.745546 | 107.683046 | 673 | 679 |
| 5 | 4.6875 | 315.0 | 5.6250 | 103.933046 | 104.870546 | 655 | 661 |
| 10 | 9.3750 | 337.5 | 10.3125 | 108.620546 | 109.558046 | 685 | 691 |
#start, end = pd.DataFrame(trial_info * nda.Monet2).loc[0,['start_idx', 'end_idx']] # Fetch indices of trial
#print(f'Trial starts at index: {start} and ends at index {end}')
# we can slice the stimulus aligned movie according to indices of trial
onset_trial_slice = movie[:,:,directions_df.onset_frame_number]
offset_trial_slice = movie[:,:,directions_df.offset_frame_number-1]
onset_trial_slice.shape
(90, 160, 16)
fig, axs = plt.subplots(16, 4, dpi=150, figsize=(4,16))
for n in range(onset_trial_slice.shape[2]):
axs[n,0].imshow(onset_trial_slice[:,:,n], cmap='gray')
axs[n,1].imshow(offset_trial_slice[:,:,n], cmap='gray')
#axs[0].set_title(f'direction: {start}')
#axs[1].imshow(stimulus_trial_slice[:,:,-1], cmap='gray')
#axs[1].set_title(f'frame: {end}')
[ax.axis('off') for ax in axs.ravel()];
import requests
import skvideo.io
base_url = 'https://bossdb-open-data.s3.amazonaws.com/iarpa_microns/minnie/functional_data/stimulus_movies'
filename = f'stimulus_17797_{scan_key["session"]}_{scan_key["scan_idx"]}_v1.avi'
url = base_url + '/' + filename
url
'https://bossdb-open-data.s3.amazonaws.com/iarpa_microns/minnie/functional_data/stimulus_movies/stimulus_17797_4_7_v1.avi'
# movie_aws = requests.get(url)
# with open(filename, 'wb') as f:
# f.write(movie_aws.content)
nda.SummaryImages & field_key
| session Session ID | scan_idx Scan ID | field Field Number | correlation correlation image | average average image |
|---|---|---|---|---|
| 4 | 7 | 4 | =BLOB= | =BLOB= |
Total: 1
corr, avg = (nda.SummaryImages & field_key).fetch1('correlation', 'average')
fig, axs = plt.subplots(1, 3, figsize=(10,6), dpi=200)
axs[0].imshow(corr)
axs[0].set_title('correlation image')
axs[1].imshow(avg)
axs[1].set_title('average image')
axs[2].imshow(corr*avg) # gives a good view of the cell bodies and darkens vessels
axs[2].set_title('correlation * average image')
[ax.axis('off') for ax in axs];
[ax.set_aspect('auto') for ax in axs];
nda.Segmentation * nda.MaskClassification & field_key
| session Session ID | scan_idx Scan ID | field Field Number | mask_id | pixels indices into the image in column major (Fortran) order | weights weights of the mask at the indices above | mask_type classification of mask as soma or artifact |
|---|---|---|---|---|---|---|
| 4 | 7 | 4 | 1 | =BLOB= | =BLOB= | artifact |
| 4 | 7 | 4 | 2 | =BLOB= | =BLOB= | soma |
| 4 | 7 | 4 | 3 | =BLOB= | =BLOB= | soma |
| 4 | 7 | 4 | 4 | =BLOB= | =BLOB= | artifact |
| 4 | 7 | 4 | 5 | =BLOB= | =BLOB= | soma |
| 4 | 7 | 4 | 6 | =BLOB= | =BLOB= | soma |
| 4 | 7 | 4 | 7 | =BLOB= | =BLOB= | soma |
| 4 | 7 | 4 | 8 | =BLOB= | =BLOB= | soma |
| 4 | 7 | 4 | 9 | =BLOB= | =BLOB= | artifact |
| 4 | 7 | 4 | 10 | =BLOB= | =BLOB= | artifact |
| 4 | 7 | 4 | 11 | =BLOB= | =BLOB= | artifact |
| 4 | 7 | 4 | 12 | =BLOB= | =BLOB= | soma |
...
Total: 1389
# function that will retrieve masks in convenient format and optionally plot
masks = func.get_all_masks(field_key, mask_type='soma', plot=True)
nda.ScanUnit() & scan_key & {'field':2}
| session Session ID | scan_idx Scan ID | unit_id unique per scan | field Field Number | mask_id mask id unique per field | um_x centroid x motor coordinates (microns) | um_y centroid y motor coordinates (microns) | um_z centroid z motor coordinates (microns) | px_x centroid x pixel coordinate in field (pixels) | px_y centroid y pixel coordinate in field (pixels) | ms_delay delay from start of frame (field 1 pixel 1) to recording of this unit (milliseconds) |
|---|---|---|---|---|---|---|---|---|---|---|
| 4 | 7 | 644 | 2 | 1 | 87 | -670 | 80 | 121 | 46 | 21 |
| 4 | 7 | 645 | 2 | 2 | -146 | -560 | 80 | 28 | 90 | 23 |
| 4 | 7 | 646 | 2 | 3 | -7 | -552 | 80 | 83 | 93 | 23 |
| 4 | 7 | 647 | 2 | 4 | 81 | -566 | 80 | 119 | 87 | 23 |
| 4 | 7 | 648 | 2 | 5 | -109 | -470 | 80 | 42 | 126 | 25 |
| 4 | 7 | 649 | 2 | 6 | -142 | -442 | 80 | 29 | 137 | 25 |
| 4 | 7 | 650 | 2 | 7 | -121 | -436 | 80 | 38 | 140 | 25 |
| 4 | 7 | 651 | 2 | 8 | 46 | -462 | 80 | 104 | 129 | 25 |
| 4 | 7 | 652 | 2 | 9 | 94 | -460 | 80 | 123 | 130 | 25 |
| 4 | 7 | 653 | 2 | 10 | 243 | -396 | 80 | 183 | 156 | 26 |
| 4 | 7 | 654 | 2 | 11 | -205 | -353 | 80 | 4 | 173 | 27 |
| 4 | 7 | 655 | 2 | 12 | -119 | -348 | 80 | 38 | 175 | 27 |
...
Total: 452
nda.Fluorescence() & field_key
| session Session ID | scan_idx Scan ID | field Field Number | mask_id mask ID, unique per field | trace fluorescence trace |
|---|---|---|---|---|
| 4 | 7 | 4 | 1 | =BLOB= |
| 4 | 7 | 4 | 2 | =BLOB= |
| 4 | 7 | 4 | 3 | =BLOB= |
| 4 | 7 | 4 | 4 | =BLOB= |
| 4 | 7 | 4 | 5 | =BLOB= |
| 4 | 7 | 4 | 6 | =BLOB= |
| 4 | 7 | 4 | 7 | =BLOB= |
| 4 | 7 | 4 | 8 | =BLOB= |
| 4 | 7 | 4 | 9 | =BLOB= |
| 4 | 7 | 4 | 10 | =BLOB= |
| 4 | 7 | 4 | 11 | =BLOB= |
| 4 | 7 | 4 | 12 | =BLOB= |
...
Total: 1389
calcium_trace = (nda.Fluorescence() & field_key & {'mask_id': 500}).fetch1('trace')
fig, ax = plt.subplots(figsize=(10, 3), dpi=150)
ax.plot(frame_times, calcium_trace, c='g')
ax.set_xlabel('time (sec)')
ax.set_ylabel('Fluorescence')
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
# lets zoom in on one portion to see some transients
fig, ax = plt.subplots(figsize=(10, 3), dpi=150)
ax.plot(frame_times[3000:4000], calcium_trace[3000:4000], c='g')
ax.set_xlabel('Time (sec)')
ax.set_ylabel('Fluorescence')
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
Task 1.11: Pull out all the fluorescence traces from a single field. Hint, use * join on a filtered ScanUnit table. Use fetch to return all the traces, use np.vstack to concatentate them all together into a matrix.
fluor=(nda.ScanUnit() & scan_key & {'field':2}) * nda.Fluorescence()
fluor
| session Session ID | scan_idx Scan ID | unit_id unique per scan | field Field Number | mask_id mask ID, unique per field | um_x centroid x motor coordinates (microns) | um_y centroid y motor coordinates (microns) | um_z centroid z motor coordinates (microns) | px_x centroid x pixel coordinate in field (pixels) | px_y centroid y pixel coordinate in field (pixels) | ms_delay delay from start of frame (field 1 pixel 1) to recording of this unit (milliseconds) | trace fluorescence trace |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 | 7 | 644 | 2 | 1 | 87 | -670 | 80 | 121 | 46 | 21 | =BLOB= |
| 4 | 7 | 645 | 2 | 2 | -146 | -560 | 80 | 28 | 90 | 23 | =BLOB= |
| 4 | 7 | 646 | 2 | 3 | -7 | -552 | 80 | 83 | 93 | 23 | =BLOB= |
| 4 | 7 | 647 | 2 | 4 | 81 | -566 | 80 | 119 | 87 | 23 | =BLOB= |
| 4 | 7 | 648 | 2 | 5 | -109 | -470 | 80 | 42 | 126 | 25 | =BLOB= |
| 4 | 7 | 649 | 2 | 6 | -142 | -442 | 80 | 29 | 137 | 25 | =BLOB= |
| 4 | 7 | 650 | 2 | 7 | -121 | -436 | 80 | 38 | 140 | 25 | =BLOB= |
| 4 | 7 | 651 | 2 | 8 | 46 | -462 | 80 | 104 | 129 | 25 | =BLOB= |
| 4 | 7 | 652 | 2 | 9 | 94 | -460 | 80 | 123 | 130 | 25 | =BLOB= |
| 4 | 7 | 653 | 2 | 10 | 243 | -396 | 80 | 183 | 156 | 26 | =BLOB= |
| 4 | 7 | 654 | 2 | 11 | -205 | -353 | 80 | 4 | 173 | 27 | =BLOB= |
| 4 | 7 | 655 | 2 | 12 | -119 | -348 | 80 | 38 | 175 | 27 | =BLOB= |
...
Total: 452
F=fluor.fetch('trace')
F
array([array([-17.700603, 49.312416, 43.1653 , ..., 53.64555 , 154.35057 ,
115.52162 ], dtype=float32) ,
array([57.50622 , 74.11323 , 2.7417843, ..., 74.89302 , 23.326519 ,
-1.6611774], dtype=float32) ,
array([52.478912, 16.43683 , 33.406353, ..., 39.488457, 32.297337,
20.9168 ], dtype=float32) ,
array([-12.319521, -25.868952, 4.250293, ..., 36.00836 , -0.660595,
55.47509 ], dtype=float32) ,
array([20.25117 , 21.56239 , -9.004405, ..., 12.784739, 55.154667,
27.247154], dtype=float32) ,
array([23.222157, 35.00185 , 22.134014, ..., 34.947796, 34.25752 ,
28.925497], dtype=float32) ,
array([ 14.531469 , 3.0383487, -32.372585 , ..., 26.886889 ,
2.2046714, 35.945927 ], dtype=float32) ,
array([44.9388 , 15.333386, 75.13128 , ..., 15.789336, 16.237127,
35.08697 ], dtype=float32) ,
array([ 49.355797, -12.361184, 28.695513, ..., 21.76151 , 42.324917,
55.516773], dtype=float32) ,
array([ 33.354473, -11.302059, 39.946663, ..., 26.919924, 17.6749 ,
38.73648 ], dtype=float32) ,
array([28.43608 , 26.906569, 24.215025, ..., 8.765736, 21.833866,
22.619272], dtype=float32) ,
array([ 12.88404 , 86.96808 , 56.406815, ..., 14.637604, -49.799007,
8.143722], dtype=float32) ,
array([66.6964 , 85.93194 , 42.35524 , ..., 49.46484 , 24.47011 ,
18.039713], dtype=float32) ,
array([95.13944 , 61.083454, 43.584293, ..., 73.40217 , 1.39554 ,
61.661823], dtype=float32) ,
array([79.09809 , 25.283218, 59.465412, ..., 27.480755, 18.182104,
36.046078], dtype=float32) ,
array([100.02583 , 43.24615 , 28.48972 , ..., 12.980695, 23.840553,
11.906016], dtype=float32) ,
array([ 21.560291 , -16.377972 , -6.0740943, ..., -48.59617 ,
-18.291056 , 22.711184 ], dtype=float32) ,
array([15.536628 , 6.2849703, 8.819455 , ..., 3.9620469, -1.6346684,
18.680317 ], dtype=float32) ,
array([118.555984 , 24.766588 , 70.08022 , ..., -3.7761588,
-21.94663 , 66.223274 ], dtype=float32) ,
array([ 97.03738 , 108.971436, 23.586023, ..., -14.1526 , -8.528526,
-5.041514], dtype=float32) ,
array([ 96.38854 , 73.907036, 122.273224, ..., 49.36943 , -8.764109,
45.105434], dtype=float32) ,
array([32.199493 , 20.51914 , 0.16746327, ..., 53.30635 ,
25.750946 , 29.475529 ], dtype=float32) ,
array([125.004 , 111.49444 , 7.8459797, ..., 4.3748164,
-17.393417 , -22.888767 ], dtype=float32) ,
array([85.733246 , 16.69866 , 50.408306 , ..., 24.868233 , -0.8307447,
28.338366 ], dtype=float32) ,
array([52.10884 , 42.686337, 65.60523 , ..., 18.784082, 30.604153,
32.33743 ], dtype=float32) ,
array([36.5956 , 43.55474 , 13.125066 , ..., 27.142948 , 18.154198 ,
3.5781865], dtype=float32) ,
array([30.2821 , 2.6229072, 54.657692 , ..., 16.031433 , 5.5630455,
23.422997 ], dtype=float32) ,
array([ 69.28356 , -17.351593 , 39.679173 , ..., -1.0014917,
8.2119055, 43.90289 ], dtype=float32) ,
array([ 53.73076 , 54.5232 , 68.90041 , ..., 13.060716, -11.147834,
33.83466 ], dtype=float32) ,
array([39.381535 , 49.78048 , 1.8985796, ..., 17.860275 , -3.0292315,
39.596703 ], dtype=float32) ,
array([58.51706 , 3.7804914, 40.935226 , ..., 7.320991 , 17.480003 ,
-3.8722248], dtype=float32) ,
array([449.16528 , 362.13663 , 358.02875 , ..., 17.103928, -21.224022,
23.59767 ], dtype=float32) ,
array([31.569323, 22.393719, 29.206694, ..., 24.903158, 57.021637,
23.29607 ], dtype=float32) ,
array([135.74341 , 133.78084 , 117.06855 , ..., -10.934167, -10.510455,
-14.98389 ], dtype=float32) ,
array([11.602903, 43.432373, 32.71441 , ..., -1.874429, -8.706152,
40.957546], dtype=float32) ,
array([77.50588 , 61.171135, 67.13704 , ..., 25.057646, 8.436238,
29.815687], dtype=float32) ,
array([ 38.56221 , 52.244633, 16.93938 , ..., 11.377101, -16.54273 ,
24.461279], dtype=float32) ,
array([66.49883 , 3.8629692, 44.322147 , ..., 27.346893 , 28.368147 ,
42.16386 ], dtype=float32) ,
array([21.449043 , 30.953856 , 1.8682066, ..., 23.576038 , 23.94928 ,
8.010679 ], dtype=float32) ,
array([113.13658 , 36.878963 , 68.42751 , ..., 46.14499 ,
-11.181146 , -7.3737392], dtype=float32) ,
array([52.759815, 41.231888, 85.86913 , ..., 8.078138, 9.730503,
16.640955], dtype=float32) ,
array([74.73009 , 53.350536 , 38.59745 , ..., 1.2078903, 39.272785 ,
69.39258 ], dtype=float32) ,
array([149.94972 , 83.24869 , 197.2578 , ..., 87.65908 , 76.917595,
65.1013 ], dtype=float32) ,
array([-13.653163, 32.67828 , 17.8564 , ..., 21.922722, -16.90156 ,
31.131136], dtype=float32) ,
array([ 4.3835483, -25.435614 , 71.88644 , ..., 7.0578427,
12.604587 , 54.717857 ], dtype=float32) ,
array([52.13401 , 36.76527 , 32.25972 , ..., 21.525703, 16.166018,
22.280104], dtype=float32) ,
array([33.049454 , 41.63681 , 3.1845284, ..., 19.857689 , 28.242657 ,
99.538055 ], dtype=float32) ,
array([23.524996, 38.66637 , 22.209602, ..., 11.856684, 36.591824,
13.609148], dtype=float32) ,
array([-7.318353, 36.115025, 93.69837 , ..., -5.069037, 31.580698,
69.140854], dtype=float32) ,
array([68.74566 , 21.405441 , 4.854109 , ..., 30.994644 , 9.16288 ,
2.8712397], dtype=float32) ,
array([-14.929606 , 7.4358897, 10.084245 , ..., 38.429653 ,
40.23658 , 44.710663 ], dtype=float32) ,
array([101.77738 , 84.43473 , 93.46451 , ..., 45.794846, 49.72915 ,
37.561703], dtype=float32) ,
array([54.091576, 26.234873, 12.809801, ..., 11.270266, -9.181697,
7.967676], dtype=float32) ,
array([20.218645, 33.218307, 59.937847, ..., 30.367008, 20.461124,
15.111072], dtype=float32) ,
array([46.31069 , 8.029847, 36.816772, ..., 42.90015 , 51.936626,
40.139706], dtype=float32) ,
array([149.83366 , 107.08499 , 124.94859 , ..., -7.311983 ,
2.5715237, -7.1932383], dtype=float32) ,
array([116.58164 , 88.17101 , 58.64501 , ..., 7.6048512,
-7.3576536, 9.445563 ], dtype=float32) ,
array([ 45.90076 , 32.463886, 35.94663 , ..., -22.131453, 31.246977,
18.119541], dtype=float32) ,
array([57.212383, 41.19167 , 23.851536, ..., 43.988876, 19.400547,
64.16236 ], dtype=float32) ,
array([123.82718 , -6.5504365, 68.463394 , ..., 42.731644 ,
-1.9844729, 37.14521 ], dtype=float32) ,
array([ 66.44931 , 46.217777, 48.63609 , ..., -17.839687, 43.987003,
53.844715], dtype=float32) ,
array([ 38.21793 , -31.240723, 21.064117, ..., 107.08791 , 66.048454,
52.043858], dtype=float32) ,
array([ 8.440571, -26.086304, -25.459196, ..., 9.868495, 13.845292,
23.597624], dtype=float32) ,
array([91.41175 , 27.625187 , 25.2551 , ..., 5.5982075, -2.2632704,
-9.761079 ], dtype=float32) ,
array([ -8.005542 , 24.643383 , -1.7242837, ..., -37.87684 ,
-14.672522 , 36.672756 ], dtype=float32) ,
array([ -1.7341838, -16.473227 , 36.530785 , ..., 18.65367 ,
49.208897 , 26.745985 ], dtype=float32) ,
array([74.37423 , 38.411003 , 17.835619 , ..., 0.52856433,
4.1994658 , 10.909828 ], dtype=float32) ,
array([92.11507 , 52.64642 , 95.5627 , ..., 35.299625 , 64.63018 ,
1.8364543], dtype=float32) ,
array([45.58549 , 14.477849, 27.67844 , ..., 16.574757, 15.584245,
22.63211 ], dtype=float32) ,
array([118.87218 , 69.78286 , 62.42473 , ..., 25.485428, -9.489257,
28.709259], dtype=float32) ,
array([ 71.57351 , -19.680431, -100.94282 , ..., -14.515312,
-16.976002, 11.531021], dtype=float32) ,
array([73.06389 , 13.481495 , 40.13094 , ..., 26.39118 , -4.5126667,
15.687696 ], dtype=float32) ,
array([85.037636 , 42.868015 , 24.167812 , ..., 21.572731 , 24.727411 ,
7.9471164], dtype=float32) ,
array([-16.01294 , -75.42608 , -3.2986584 , ..., -72.85579 ,
4.875955 , 0.97734654], dtype=float32) ,
array([139.3661 , 89.19717 , 34.59019 , ..., 42.67927 , 20.531324,
12.783111], dtype=float32) ,
array([271.8524 , 167.92735 , 128.5078 , ..., 21.369473 ,
-5.9914107, 10.440172 ], dtype=float32) ,
array([46.584816, 31.626095, 13.11639 , ..., 3.652834, 23.398993,
70.07141 ], dtype=float32) ,
array([145.75687 , 58.725082, 12.564879, ..., 65.220055, -2.714381,
-27.42287 ], dtype=float32) ,
array([47.749527 , 78.57568 , 51.033344 , ..., 3.262245 , 34.46954 ,
7.1600323], dtype=float32) ,
array([ 53.707542 , -43.5321 , 7.7062554, ..., -13.244367 ,
8.5380335, 13.360854 ], dtype=float32) ,
array([ 51.33779 , -41.377327, -22.360668, ..., -3.699636, -14.158005,
-6.223731], dtype=float32) ,
array([54.442547 , 23.216398 , -4.0693207, ..., 84.82789 , 91.26755 ,
82.06845 ], dtype=float32) ,
array([ 8.022685 , -33.463455 , -32.395042 , ..., 11.315526 ,
26.022108 , 5.6229386], dtype=float32) ,
array([102.430954, 58.627533, 60.72243 , ..., 8.712411, 66.5233 ,
19.77434 ], dtype=float32) ,
array([ 13.472848 , -14.875306 , 16.515192 , ..., 2.4712124 ,
20.794254 , 0.16997382], dtype=float32) ,
array([ 37.0768 , -12.805904, -24.864124, ..., 20.78951 , 25.871597,
21.257109], dtype=float32) ,
array([39.19234 , 2.2530289, 30.183674 , ..., 51.045017 , 28.692915 ,
26.042522 ], dtype=float32) ,
array([195.13124 , 85.83014 , 153.43765 , ..., 4.2165046,
1.2655593, -5.8660502], dtype=float32) ,
array([66.915054, 52.806072, 52.404675, ..., -2.77463 , 5.344121,
-9.447115], dtype=float32) ,
array([105.56563 , 54.49863 , 123.5293 , ..., 18.805874, 14.527562,
22.078308], dtype=float32) ,
array([161.50537 , 80.2748 , 129.33846 , ..., 13.617409 ,
-7.347784 , 1.5456859], dtype=float32) ,
array([ 98.29192 , 76.31319 , 58.763325 , ..., -10.407499 ,
2.814384 , -0.25861883], dtype=float32) ,
array([121.341446 , 26.117912 , 6.7488284, ..., -41.38278 ,
-17.570835 , -15.649808 ], dtype=float32) ,
array([133.0223 , 84.67368 , 96.61394 , ..., -26.676064 ,
2.3866177, -23.338829 ], dtype=float32) ,
array([118.41443 , 18.035372 , 49.621895 , ..., 2.4866168,
3.2989805, 25.205908 ], dtype=float32) ,
array([ 88.714066, 29.741196, 26.556957, ..., -27.604446, -20.033888,
-22.781477], dtype=float32) ,
array([-22.410734 , 5.4336796, 4.2411795, ..., -1.0375835,
-7.705541 , 35.159126 ], dtype=float32) ,
array([70.69714 , 18.887154, 7.721644, ..., 17.369703, 12.790304,
18.06103 ], dtype=float32) ,
array([60.122524, 27.05372 , 20.37373 , ..., 43.677273, 55.08138 ,
25.561241], dtype=float32) ,
array([145.05753 , 20.429499, 58.16358 , ..., -36.535526, 39.01958 ,
-2.9943 ], dtype=float32) ,
array([ 10.7662525, 2.037899 , 31.184877 , ..., 13.822812 ,
-24.79089 , -19.938263 ], dtype=float32) ,
array([45.117744, 11.379687, 42.620064, ..., 12.531982, 38.794643,
21.431856], dtype=float32) ,
array([45.23708 , 12.414099 , -1.1504086, ..., 18.361124 , 11.580312 ,
36.991165 ], dtype=float32) ,
array([ 17.454653 , -5.8044662, -44.222874 , ..., 8.997067 ,
3.003137 , 38.77822 ], dtype=float32) ,
array([120.36061 , 40.664852, 46.83704 , ..., 33.370914, -26.109436,
30.91559 ], dtype=float32) ,
array([30.564127 , 33.813828 , 11.578891 , ..., 3.4348226, -8.452824 ,
4.599533 ], dtype=float32) ,
array([ 62.06665 , 45.246075 , -21.412271 , ..., -2.3179762,
-1.3737955, 5.8981276], dtype=float32) ,
array([82.38294 , 9.991104 , 68.247345 , ..., 14.751661 , 0.9288387,
16.122383 ], dtype=float32) ,
array([ 68.318756 , 49.317734 , 44.122692 , ..., -11.27215 ,
-0.19710156, 6.873884 ], dtype=float32) ,
array([ 43.868378 , 74.0315 , 28.058037 , ..., -8.610584 ,
4.1679873, -22.118818 ], dtype=float32) ,
array([206.31343 , 233.98445 , 192.43242 , ..., 27.32854 , 8.298529,
-27.583607], dtype=float32) ,
array([110.61011 , 36.367092 , 95.53954 , ..., 8.555662 ,
3.7742765, 10.785977 ], dtype=float32) ,
array([61.294403 , 61.507763 , 85.985664 , ..., 29.349981 , 1.7525084,
10.932927 ], dtype=float32) ,
array([110.48998 , 59.11708 , 86.47618 , ..., 9.650214, 5.718976,
29.22783 ], dtype=float32) ,
array([ 72.48707 , 40.249035, 68.91513 , ..., -37.59265 , -26.66978 ,
-14.727171], dtype=float32) ,
array([ 87.45032 , 43.980507 , 33.126717 , ..., -0.60814613,
-4.230551 , -15.498258 ], dtype=float32) ,
array([70.02197 , 91.50859 , 27.348 , ..., -2.783497, 11.002075,
16.105396], dtype=float32) ,
array([110.72128 , 19.411146, 14.299809, ..., -9.694554, 19.899492,
17.00219 ], dtype=float32) ,
array([92.77664 , 16.845575, 10.594774, ..., 37.99655 , 19.943037,
20.152779], dtype=float32) ,
array([124.76796 , 97.194 , 55.67973 , ..., -14.128829, -13.111217,
30.47886 ], dtype=float32) ,
array([83.281944, 44.332527, 54.789455, ..., 27.02883 , 30.859451,
14.359209], dtype=float32) ,
array([80.87196 , 44.986977, 65.09583 , ..., 11.332088, 35.185352,
25.432268], dtype=float32) ,
array([-17.183512 , 69.26789 , -5.966991 , ..., 3.2367637,
26.739996 , 10.228867 ], dtype=float32) ,
array([ 89.18175 , 47.55677 , 43.883205 , ..., 31.101473 ,
-0.93277293, -13.139431 ], dtype=float32) ,
array([104.023994, 122.27158 , 10.946925, ..., 5.837664, -23.620804,
-9.597525], dtype=float32) ,
array([ 42.409817 , -0.87746066, 22.2218 , ..., 11.378514 ,
-21.025135 , 20.88356 ], dtype=float32) ,
array([ 48.518192, 29.583384, -30.23706 , ..., -15.639634, 26.08138 ,
15.51039 ], dtype=float32) ,
array([ 8.910029 , 4.1429253, 35.394794 , ..., -13.113311 ,
-12.647193 , -31.079805 ], dtype=float32) ,
array([51.445374 , 8.93799 , -1.6077504, ..., -5.614953 , 36.302162 ,
30.893665 ], dtype=float32) ,
array([ 78.867035, 64.82197 , 88.57605 , ..., -7.826862, -8.38067 ,
-14.669364], dtype=float32) ,
array([235.9463 , 185.06978 , 187.70389 , ..., -8.228969, 8.052099,
23.670984], dtype=float32) ,
array([ 88.36556 , 99.243576 , 50.320564 , ..., 40.09635 ,
-12.309992 , -9.7455845], dtype=float32) ,
array([ -6.2055535, -10.560891 , 41.660072 , ..., -42.073868 ,
-39.791622 , -20.127539 ], dtype=float32) ,
array([ 74.31622 , 41.572308, 21.107656, ..., 6.393596, -9.725095,
-15.96325 ], dtype=float32) ,
array([108.46506 , 56.067707, 56.868996, ..., -9.448486, -28.1474 ,
-10.159643], dtype=float32) ,
array([106.585014, 99.70483 , 32.302666, ..., -4.645703, -37.484383,
-22.465511], dtype=float32) ,
array([ 28.132235, -49.493347, -12.813574, ..., -17.277332, -28.34616 ,
27.553263], dtype=float32) ,
array([120.29385 , 76.16499 , 44.51188 , ..., -3.6501672,
-14.589302 , -0.8527669], dtype=float32) ,
array([ 38.205757 , 48.010475 , -12.203835 , ..., 0.20209552,
-4.7419314 , 8.321297 ], dtype=float32) ,
array([ 28.757858 , -4.7559533, -14.290412 , ..., -12.699011 ,
9.039983 , 26.367811 ], dtype=float32) ,
array([ 69.09791 , 69.15576 , 22.79198 , ..., -10.472762, 22.325285,
32.071964], dtype=float32) ,
array([157.45042 , 103.333305 , 125.366615 , ..., -16.91541 ,
39.406525 , -7.6825576], dtype=float32) ,
array([132.00266 , 73.420204, 101.45505 , ..., 61.33037 , 7.574492,
29.955173], dtype=float32) ,
array([ 31.332958 , -25.858131 , 22.650528 , ..., 10.350059 ,
-5.9388437, -2.9465895], dtype=float32) ,
array([22.684204 , -6.3962035, 5.6856704, ..., 13.161769 , 11.302447 ,
14.240614 ], dtype=float32) ,
array([ 33.469963 , -16.591988 , 2.6586373, ..., -4.2787027,
-17.370466 , -8.243977 ], dtype=float32) ,
array([ 56.814342 , 20.941055 , 29.877924 , ..., 2.0451617,
-15.094584 , -3.5929399], dtype=float32) ,
array([ 52.710857 , 10.722162 , -1.3449411, ..., -14.118747 ,
13.517699 , 20.31187 ], dtype=float32) ,
array([46.10004 , 25.265757 , 10.23023 , ..., 4.818645 , 2.0424538,
9.667437 ], dtype=float32) ,
array([60.907433, 56.49487 , 50.783966, ..., 22.451654, 20.851713,
12.749009], dtype=float32) ,
array([ -5.050877 , -20.187891 , 10.322101 , ..., 2.4300132,
-5.100864 , -12.438675 ], dtype=float32) ,
array([58.975975, 66.62455 , 50.755856, ..., 12.166659, 42.586506,
-5.246193], dtype=float32) ,
array([26.181381 , 48.18115 , 67.63563 , ..., 48.95368 , 2.7997363,
23.74511 ], dtype=float32) ,
array([ 53.328186, 84.1167 , 115.225845, ..., 47.517334, 49.319935,
40.012997], dtype=float32) ,
array([96.29294 , 65.22244 , 36.546844, ..., 50.30496 , 35.216793,
29.538828], dtype=float32) ,
array([40.315212 , 82.504585 , 53.326096 , ..., 57.23577 , 40.166725 ,
4.7601457], dtype=float32) ,
array([ 82.7822 , 88.30622 , 150.3951 , ..., -5.885093, -27.234383,
50.636696], dtype=float32) ,
array([27.668526 , 18.715672 , 3.27956 , ..., 12.722042 , -1.8049005,
5.6267405], dtype=float32) ,
array([18.083193 , 40.35836 , -1.0715026, ..., 18.190601 , -4.9851303,
35.858376 ], dtype=float32) ,
array([27.05682 , 10.109627, 45.647556, ..., 7.008257, 8.270344,
14.254159], dtype=float32) ,
array([131.71973 , 124.05406 , 139.7345 , ..., 23.33143 , 19.619423,
25.571474], dtype=float32) ,
array([33.81815 , 88.488434 , 7.4707766, ..., 43.73195 , 23.169569 ,
34.05497 ], dtype=float32) ,
array([ 85.26463 , 53.335804 , 114.653046 , ..., 3.9680722,
-20.276602 , 45.306984 ], dtype=float32) ,
array([ 9.2365417e+01, 5.4643089e+01, 8.4926125e+01, ...,
-8.4810343e+00, 6.9855156e+00, -6.2754087e-02], dtype=float32),
array([94.62589 , 91.17571 , 86.5142 , ..., -5.8618526, 24.008743 ,
27.914202 ], dtype=float32) ,
array([153.75491 , 155.185 , 97.85079 , ..., -14.766303, -18.909513,
-35.04201 ], dtype=float32) ,
array([94.66275 , 45.528778 , 71.88086 , ..., 58.19792 , 1.0117581,
13.298099 ], dtype=float32) ,
array([33.73609 , 28.15363 , -2.4107776, ..., 3.88549 , 16.321362 ,
36.210194 ], dtype=float32) ,
array([ 23.095268, 42.449345, -14.821094, ..., 17.161959, 37.847 ,
-3.399404], dtype=float32) ,
array([16.757992 , 3.8130858, 20.28385 , ..., 1.5646784, 11.798494 ,
25.01572 ], dtype=float32) ,
array([70.52734 , 52.02745 , 48.04374 , ..., 28.115744, 28.048683,
41.59731 ], dtype=float32) ,
array([153.16733 , 127.52866 , 98.0859 , ..., -14.337296, -18.943518,
17.642067], dtype=float32) ,
array([ 86.299965, 150.54161 , 153.79066 , ..., 40.71366 , 14.782925,
9.725669], dtype=float32) ,
array([104.84579 , 25.182096, 32.07803 , ..., 16.808084, 29.532331,
-11.737584], dtype=float32) ,
array([ 61.21843 , 23.477224 , 3.0196688, ..., 7.8085055,
5.396643 , -21.950901 ], dtype=float32) ,
array([39.974865, 59.096676, 19.83555 , ..., 8.556257, 10.60343 ,
31.423698], dtype=float32) ,
array([ 40.5229 , 33.799927, -17.995655, ..., -4.005654, -4.151723,
49.052425], dtype=float32) ,
array([ 6.2670984, 50.55069 , 50.968296 , ..., 31.9184 ,
-31.984663 , -19.293997 ], dtype=float32) ,
array([113.200356 , 81.49285 , 56.860123 , ..., 11.20568 ,
3.5601025, 22.987206 ], dtype=float32) ,
array([167.93301, 157.79482, 185.23804, ..., 199.06767, 343.04337,
327.02734], dtype=float32) ,
array([ 44.909737, 27.613176, 33.958088, ..., -15.23075 , -11.526373,
13.611096], dtype=float32) ,
array([-34.684093, 29.98306 , -11.529915, ..., 21.642508, -5.79858 ,
18.590199], dtype=float32) ,
array([49.765038, 11.173132, 23.717337, ..., 26.429712, 39.483166,
51.99511 ], dtype=float32) ,
array([ 64.23038 , 61.757492, 118.38212 , ..., -11.654596, 37.840805,
24.139463], dtype=float32) ,
array([133.05313 , 113.36483 , 156.96944 , ..., 34.420372, -22.835106,
27.288614], dtype=float32) ,
array([-20.002766, -24.864729, 19.925062, ..., 43.959843, -33.84462 ,
8.006851], dtype=float32) ,
array([ 38.90917 , 89.34818 , 76.65898 , ..., -6.921184 ,
-15.275598 , 3.1818733], dtype=float32) ,
array([ 33.69449 , 42.290714 , 23.981697 , ..., 7.9695344,
-13.5135765, -34.25045 ], dtype=float32) ,
array([ 16.171621 , -21.954124 , -41.83816 , ..., -19.756979 ,
-15.338389 , 0.5003567], dtype=float32) ,
array([-50.00005 , -15.791339 , 6.7609878, ..., -18.562782 ,
6.6519895, -7.9451222], dtype=float32) ,
array([133.85365 , 89.125 , 67.10068 , ..., -1.3721178,
7.3240614, 36.45526 ], dtype=float32) ,
array([48.511723, 47.346416, 37.07621 , ..., 32.146996, 16.21911 ,
31.063515], dtype=float32) ,
array([104.95351 , 93.18255 , 40.908276, ..., 5.34017 , 9.157477,
-23.638329], dtype=float32) ,
array([ 15.141929, 45.379448, 50.97214 , ..., 6.265083, -26.141747,
26.413471], dtype=float32) ,
array([109.881386 , 77.94508 , 88.58007 , ..., -22.029163 ,
3.4502983, 2.3009698], dtype=float32) ,
array([ 78.75392 , 70.16429 , 46.54025 , ..., -44.316883 ,
-5.9063888, -0.19815 ], dtype=float32) ,
array([272.73294 , 228.61435 , 223.52737 , ..., 23.104937 ,
1.8341583, 7.3601623], dtype=float32) ,
array([119.317955 , 85.472466 , 116.517 , ..., 30.453571 ,
2.4705594, -13.97096 ], dtype=float32) ,
array([ 64.11343 , 68.93868 , 84.684845, ..., -21.553085, 9.977516,
15.55432 ], dtype=float32) ,
array([ 55.755314 , 78.463974 , 90.1513 , ..., -45.29112 ,
-3.646007 , -3.3183699], dtype=float32) ,
array([113.72207 , 115.59155 , 48.824913, ..., -33.64419 , -29.569777,
-26.56202 ], dtype=float32) ,
array([ 34.024364 , 132.06882 , 139.71825 , ..., 7.204264 ,
6.4817367, 30.098501 ], dtype=float32) ,
array([ 45.379482 , 65.520386 , 145.67708 , ..., -30.56744 ,
-14.5054655, -42.880383 ], dtype=float32) ,
array([105.40306 , 50.222874, 89.495674, ..., 27.371778, 76.22542 ,
-25.812622], dtype=float32) ,
array([ 34.56831 , 14.983641 , 43.812332 , ..., -0.22134231,
-22.92371 , 48.71775 ], dtype=float32) ,
array([42.048714 , 55.086304 , 0.28055957, ..., -6.964897 ,
9.510686 , -0.0807655 ], dtype=float32) ,
array([164.38943 , 120.94816 , 96.60563 , ..., 16.524841, 22.13588 ,
43.971348], dtype=float32) ,
array([149.22537 , 124.4336 , 89.3001 , ..., 20.698229 ,
-1.8736075, 15.687499 ], dtype=float32) ,
array([139.34398 , 120.25991 , 132.28426 , ..., -14.017559 ,
-14.124834 , 4.6535945], dtype=float32) ,
array([ 25.61402 , 49.2072 , 73.741295, ..., 16.776463, -46.42185 ,
-20.202812], dtype=float32) ,
array([ 53.531414, 72.5913 , 36.79721 , ..., -28.467285, 3.875391,
12.759032], dtype=float32) ,
array([ 31.08854 , 32.525215, 46.45776 , ..., -21.14295 , 22.037376,
20.833996], dtype=float32) ,
array([ 42.837097, 35.61789 , 36.728798, ..., 40.930405, -27.197748,
15.377942], dtype=float32) ,
array([ 85.17219 , 79.25153 , 68.22528 , ..., -40.538696, 20.989075,
-26.083584], dtype=float32) ,
array([124.19375 , 116.957726, 62.566196, ..., -17.432722, -36.68937 ,
-11.637607], dtype=float32) ,
array([157.33652 , 146.06621 , 44.95692 , ..., -2.6518757,
-20.129633 , 13.6532755], dtype=float32) ,
array([124.355736 , 91.77634 , 59.93606 , ..., 9.103567 ,
3.0855362, -16.306353 ], dtype=float32) ,
array([ 97.60666 , 164.81967 , 170.41864 , ..., 20.38121 , -9.255015,
73.96362 ], dtype=float32) ,
array([135.27182 , 122.828926 , 23.43318 , ..., 2.5473015,
-29.367155 , -27.946903 ], dtype=float32) ,
array([77.2528 , 78.68658 , 35.55612 , ..., 7.528232, 47.91317 ,
19.679668], dtype=float32) ,
array([132.50148 , 148.15659 , 97.526245, ..., 18.485723, 17.214705,
37.55034 ], dtype=float32) ,
array([16.636929 , 16.773298 , -1.4068229, ..., 17.39094 , 4.5934477,
-7.696456 ], dtype=float32) ,
array([ 22.002634, -11.301712, 32.43831 , ..., 16.271404, 23.959843,
51.673183], dtype=float32) ,
array([ 22.716522 , -29.739069 , -4.1743155, ..., 45.90264 ,
41.17347 , 8.365578 ], dtype=float32) ,
array([60.99939 , 73.78005 , 56.279163 , ..., -2.2504303, -5.048994 ,
15.950546 ], dtype=float32) ,
array([-17.95675 , -21.487589, -8.940639, ..., 50.73241 , 13.36443 ,
-19.564491], dtype=float32) ,
array([99.784065, 65.50208 , 44.20786 , ..., 18.514578, -3.337776,
8.086164], dtype=float32) ,
array([67.74645 , 49.62862 , 29.67971 , ..., 9.43898 , 6.5832305,
18.06092 ], dtype=float32) ,
array([175.91286 , 110.711266, 91.27182 , ..., -14.43156 , -7.881587,
-7.61844 ], dtype=float32) ,
array([ 66.72461 , 9.865089, -31.657688, ..., 22.880527, 33.269974,
38.892292], dtype=float32) ,
array([ 98.58727 , 100.36731 , 81.13315 , ..., -8.910835 ,
-11.684186 , -4.2893605], dtype=float32) ,
array([42.610195, 34.291176, 41.31934 , ..., 18.778242, 71.39434 ,
35.223175], dtype=float32) ,
array([105.65836 , 68.18862 , 72.75168 , ..., -4.1367745,
15.56284 , -8.257013 ], dtype=float32) ,
array([108.65394 , 110.301575, 86.12295 , ..., 19.271845, 28.932034,
28.283669], dtype=float32) ,
array([ 65.54617 , 7.1871414, -18.661331 , ..., 10.8808155,
11.479538 , 13.863609 ], dtype=float32) ,
array([ 12.071566 , -13.996367 , -1.3861504 , ..., -2.7514954 ,
0.4055102 , -0.86250645], dtype=float32) ,
array([174.37593 , 134.02084 , 127.67722 , ..., -12.866384, -35.996536,
0.93194 ], dtype=float32) ,
array([ 43.448387, 27.370884, 10.597509, ..., -21.07989 , 38.52973 ,
24.68798 ], dtype=float32) ,
array([106.941124, 120.3071 , 70.87219 , ..., 69.77831 , 85.70278 ,
93.90132 ], dtype=float32) ,
array([ 63.58876 , -1.47404 , -32.283108, ..., 18.077284, 18.2995 ,
10.086709], dtype=float32) ,
array([ 80.37028 , 56.37878 , 59.543945, ..., -26.213264, -14.57717 ,
10.625186], dtype=float32) ,
array([117.880165, 113.312065, 149.28346 , ..., -7.567905, -8.056205,
-9.980382], dtype=float32) ,
array([73.262924, 3.321896, 61.760456, ..., 66.94633 , 9.814309,
39.88783 ], dtype=float32) ,
array([ 5.3420267, 13.708056 , 40.610855 , ..., -10.084332 ,
59.818886 , -24.442104 ], dtype=float32) ,
array([14.433982 , 20.933598 , 13.375719 , ..., 8.796807 , 36.79589 ,
0.8238092], dtype=float32) ,
array([282.9877 , 114.01492 , 121.043304, ..., 65.54298 , 53.023327,
47.996895], dtype=float32) ,
array([20.137747, -3.976677, 61.711536, ..., 57.33044 , 41.496056,
29.958862], dtype=float32) ,
array([1030.1118 , 980.8866 , 780.4531 , ..., -3.605278,
-37.72198 , 62.63571 ], dtype=float32) ,
array([ 45.00792 , 70.10152 , 67.45168 , ..., -0.5935817,
-23.569841 , -6.841048 ], dtype=float32) ,
array([38.384106 , 3.1766877, 46.046177 , ..., 12.30807 , 14.192408 ,
21.100624 ], dtype=float32) ,
array([158.95592 , 33.563095, -12.101412, ..., 47.336857, 30.524137,
46.238804], dtype=float32) ,
array([74.83398 , 46.252537 , 29.761742 , ..., 13.951614 , -5.831596 ,
1.6383815], dtype=float32) ,
array([130.94931 , 16.463387, 65.64096 , ..., 13.962109, -19.528473,
16.147778], dtype=float32) ,
array([ 65.615036 , -56.120678 , -2.9886608 , ..., -0.67234457,
69.675415 , 48.15423 ], dtype=float32) ,
array([ 26.198877, -39.662518, 8.145092, ..., 61.35136 , 23.309946,
26.099089], dtype=float32) ,
array([126.46917 , 42.59384 , 68.94535 , ..., 55.52029 , 28.163778,
66.83242 ], dtype=float32) ,
array([ 28.779282 , 1.4521858, -15.658867 , ..., 29.599007 ,
26.995832 , 9.378323 ], dtype=float32) ,
array([ 82.068695, 18.788141, 75.53926 , ..., 26.894459, -16.58245 ,
-30.073284], dtype=float32) ,
array([496.9459 , 225.8657 , 155.18997 , ..., 17.122643, -26.704338,
42.316574], dtype=float32) ,
array([ 96.14958 , 76.20624 , 66.57022 , ..., -45.80942 , -51.75789 ,
-59.417652], dtype=float32) ,
array([ -4.974003, -22.187265, -11.215234, ..., 37.546608, 49.105118,
45.42471 ], dtype=float32) ,
array([-46.362934 , 17.130547 , -13.32363 , ..., -2.7834678,
10.066894 , -5.0996757], dtype=float32) ,
array([34.332054 , 17.030802 , -1.2167103, ..., -1.7793081, 37.342735 ,
31.554459 ], dtype=float32) ,
array([60.64542 , 56.44086 , 71.19067 , ..., 45.680435, 17.068655,
40.86666 ], dtype=float32) ,
array([ 76.98332 , 12.524115 , -4.3622828, ..., 6.3379164,
-12.804084 , -28.588165 ], dtype=float32) ,
array([35.91598 , 38.767227, 6.370654, ..., 37.926247, 38.389282,
32.177044], dtype=float32) ,
array([110.800545, 112.30479 , 89.79639 , ..., -44.049644, -30.212358,
62.582375], dtype=float32) ,
array([ 7.625426 , -0.18604892, -16.092297 , ..., 20.433886 ,
32.746174 , 29.538872 ], dtype=float32) ,
array([101.852585, 124.98547 , 62.21357 , ..., -16.645145, -5.808575,
61.42316 ], dtype=float32) ,
array([89.43141 , 41.41786 , -5.1470523, ..., 34.772423 , -4.5371513,
38.77321 ], dtype=float32) ,
array([49.545288 , 61.715576 , 60.523075 , ..., 10.328356 , -5.4963684,
34.74678 ], dtype=float32) ,
array([ 77.890816 , 10.795494 , 0.10374103, ..., -11.002125 ,
0.74323565, -5.4626064 ], dtype=float32) ,
array([ 41.60516 , 26.678455 , -1.4864962, ..., -8.949832 ,
-19.000284 , 18.474236 ], dtype=float32) ,
array([108.7909 , 56.60434 , 45.37121 , ..., 2.2656507,
39.311584 , 28.308554 ], dtype=float32) ,
array([ 3.3653827, 12.241132 , -12.440528 , ..., 0.4512185,
1.1042079, 14.3484745], dtype=float32) ,
array([ 21.745205 , -29.518314 , -6.984918 , ..., 35.72104 ,
53.392735 , -11.9602165], dtype=float32) ,
array([ 68.0421 , -7.198441, -11.540219, ..., 22.502905, 7.194319,
46.20945 ], dtype=float32) ,
array([ 14.629332, 38.673176, -11.443754, ..., 51.047977, 7.514555,
63.326805], dtype=float32) ,
array([115.42447 , 123.837234, 110.20754 , ..., 6.895171, 54.570328,
77.467 ], dtype=float32) ,
array([106.75473 , 7.8356314, 15.213787 , ..., -13.173706 ,
25.517982 , 19.313364 ], dtype=float32) ,
array([122.570114 , 76.58173 , 110.662384 , ..., -6.7603188,
3.017389 , 15.268992 ], dtype=float32) ,
array([ 90.91158 , 33.70345 , -21.44143 , ..., -7.6001596,
-11.899545 , 55.066387 ], dtype=float32) ,
array([109.98621 , 63.508327, 82.53104 , ..., 22.420849, 36.757244,
16.287422], dtype=float32) ,
array([137.3837 , 95.92318 , 148.76196 , ..., 23.572933, 26.339811,
47.03833 ], dtype=float32) ,
array([112.507805 , 93.919334 , 43.86624 , ..., 44.403217 ,
-1.8829418, 10.454918 ], dtype=float32) ,
array([ 86.77179 , 107.04357 , 106.344444 , ..., -6.6459446,
-16.275017 , -20.821898 ], dtype=float32) ,
array([ 68.99612 , 98.88181 , 137.4552 , ..., 10.378276 ,
-2.9788296, 8.471833 ], dtype=float32) ,
array([136.18344 , 248.10994 , 189.91068 , ..., 1.3724672,
29.05232 , 3.1817062], dtype=float32) ,
array([126.04197 , 25.768026 , 106.35774 , ..., 16.027271 ,
3.9019086, 10.76449 ], dtype=float32) ,
array([ 98.5568 , 12.719248 , -3.0585294 , ..., -57.69399 ,
-4.5081835 , 0.38602245], dtype=float32) ,
array([ 39.844505, -28.812075, 29.170341, ..., -8.839466, -6.192053,
-28.652899], dtype=float32) ,
array([133.59183 , 172.51324 , 82.63059 , ..., 18.706108, 34.59313 ,
32.531033], dtype=float32) ,
array([ 25.650389 , -1.9664857, 23.632366 , ..., 21.243095 ,
34.49151 , -19.909634 ], dtype=float32) ,
array([ 68.40261 , 4.1547923, 52.802986 , ..., 16.101147 ,
-14.967826 , -39.8129 ], dtype=float32) ,
array([139.09132 , 84.64926 , 100.30137 , ..., 40.822445, 23.562622,
79.61648 ], dtype=float32) ,
array([47.95062 , 22.768036, 36.670887, ..., 40.7102 , 28.908657,
41.281586], dtype=float32) ,
array([ 26.197039 , -45.782524 , -30.216753 , ..., -3.8371296,
-6.343991 , -40.69964 ], dtype=float32) ,
array([ 23.344435 , 17.930424 , 39.85921 , ..., -1.1306973,
-41.259716 , 40.47689 ], dtype=float32) ,
array([129.56116 , 52.15536 , 109.836685, ..., -5.093879, -81.542076,
-15.605944], dtype=float32) ,
array([ 81.728645 , 88.744514 , 99.47336 , ..., 6.3377576,
-52.08337 , 30.15016 ], dtype=float32) ,
array([ 40.5799 , 35.156315, -20.871151, ..., -9.455501, -8.209816,
-21.846378], dtype=float32) ,
array([49.379032, -8.09678 , -3.567316, ..., 12.79733 , 8.564194,
30.783617], dtype=float32) ,
array([-23.955109 , -0.86116624, 21.980911 , ..., -4.6222496 ,
5.071673 , 64.47828 ], dtype=float32) ,
array([ 30.443829, 81.03683 , 55.55759 , ..., 10.894181, 6.414945,
-11.570231], dtype=float32) ,
array([50.29781 , 24.644598, 32.531124, ..., 29.456507, 81.21843 ,
62.60541 ], dtype=float32) ,
array([-32.422974 , 0.6290473, 21.521872 , ..., -24.688019 ,
-23.1531 , -32.583878 ], dtype=float32) ,
array([66.779305 , 70.105965 , 3.233191 , ..., -1.032225 , 34.917774 ,
-6.7953386], dtype=float32) ,
array([ 59.996334 , -2.922262 , -17.089985 , ..., 26.710157 ,
1.0176568, 37.684235 ], dtype=float32) ,
array([ -2.3855965, -51.202522 , -2.69107 , ..., 70.84834 ,
-2.2277486, 25.64413 ], dtype=float32) ,
array([ 18.912207, -10.317416, -41.590263, ..., 46.882236, 25.86892 ,
-10.630154], dtype=float32) ,
array([11.539084 , 84.26196 , 4.2565675, ..., -2.8090193, -7.342223 ,
61.65155 ], dtype=float32) ,
array([ 44.284706, 10.328801, 51.540474, ..., -64.528534, -34.85784 ,
-32.238667], dtype=float32) ,
array([ 21.640478, -39.34124 , 2.212209, ..., -8.816599, -18.5542 ,
18.32376 ], dtype=float32) ,
array([-1.2190403e-02, -6.3129382e+00, -2.2911129e+01, ...,
-9.2751181e-01, 2.5386940e+01, 1.7394728e+01], dtype=float32),
array([121.113174 , 110.97329 , 237.28401 , ..., 0.67492044,
-10.495742 , 6.649436 ], dtype=float32) ,
array([-23.95306 , 19.840439, -23.849329, ..., 63.9422 , 30.770863,
39.37214 ], dtype=float32) ,
array([ 62.452297, -34.37864 , -29.3842 , ..., -13.507882, -35.7286 ,
-25.025764], dtype=float32) ,
array([114.56742 , 43.207592, 79.10671 , ..., 63.85689 , 75.03774 ,
72.26308 ], dtype=float32) ,
array([75.89263 , 52.979656 , -4.0846004, ..., 87.55766 , 97.81799 ,
63.1558 ], dtype=float32) ,
array([ 15.65352 , 30.67085 , -24.197369, ..., 4.225737, 30.92986 ,
41.144287], dtype=float32) ,
array([58.394 , 85.93384 , 29.654743, ..., 62.709072, -3.20404 ,
65.31744 ], dtype=float32) ,
array([115.76107 , 12.95802 , 47.05477 , ..., -28.84363 , 29.549196,
30.058346], dtype=float32) ,
array([118.00105 , 99.00753 , 39.03161 , ..., 4.5956645,
28.927729 , -19.359503 ], dtype=float32) ,
array([60.29696 , 48.672333, 53.6252 , ..., 24.022142, 46.62648 ,
72.386826], dtype=float32) ,
array([ 0.98834115, -49.856174 , 41.716 , ..., -28.214527 ,
-42.776676 , 16.91918 ], dtype=float32) ,
array([184.402 , 87.60055 , 36.42499 , ..., 6.806196, 30.54793 ,
35.154137], dtype=float32) ,
array([ -3.7057137, -16.336193 , 15.367186 , ..., 355.1977 ,
298.9943 , 291.79443 ], dtype=float32) ,
array([ -1.3177904, -19.342466 , -19.228992 , ..., -4.5505257,
18.028448 , -6.327418 ], dtype=float32) ,
array([ 59.677998, 157.30206 , 96.40619 , ..., 40.772903, -14.536325,
42.9045 ], dtype=float32) ,
array([ 80.02479 , 4.6804376, -20.813473 , ..., 58.828495 ,
66.824104 , 49.90996 ], dtype=float32) ,
array([ 76.764275, 59.818874, 8.614109, ..., -12.687641, -22.526175,
-6.462732], dtype=float32) ,
array([206.84126 , 38.766655 , 109.54071 , ..., 20.181398 ,
-7.1683826, 85.884605 ], dtype=float32) ,
array([103.44868 , 75.218864, 53.723824, ..., -16.600018, 13.379003,
24.18946 ], dtype=float32) ,
array([161.3854 , 161.87674 , 76.03695 , ..., 9.127612 ,
-5.3839126, 18.941366 ], dtype=float32) ,
array([124.12251 , 90.86967 , 73.15283 , ..., -8.874397 ,
3.6414173, -24.511988 ], dtype=float32) ,
array([128.19049 , 174.9081 , 39.400154 , ..., -1.3891184,
22.506216 , 21.83929 ], dtype=float32) ,
array([46.951553, 65.70357 , 57.086853, ..., 15.966877, 16.557917,
58.975735], dtype=float32) ,
array([40.115402 , 54.775383 , 54.23645 , ..., 11.514095 , 4.4808736,
34.068985 ], dtype=float32) ,
array([ 58.40174 , 7.9772954, 28.990656 , ..., 3.662454 ,
-1.4670904, -35.42288 ], dtype=float32) ,
array([43.824562 , 55.599773 , 93.283005 , ..., -2.1243534, -6.2169085,
57.96186 ], dtype=float32) ,
array([ 79.240685, 125.2214 , 166.37308 , ..., 38.91084 , 113.73408 ,
64.24347 ], dtype=float32) ,
array([-51.69471 , -48.05496 , -6.238637, ..., -49.775536, -34.393047,
-12.667548], dtype=float32) ,
array([-5.854559, 40.26478 , 71.91387 , ..., 34.394123, 40.403805,
26.403646], dtype=float32) ,
array([106.99298 , 121.8535 , 84.652245, ..., 14.955463, 0.278759,
29.551243], dtype=float32) ,
array([325.81705 , 347.12405 , 264.1404 , ..., -12.366158 ,
1.6256083, 47.004925 ], dtype=float32) ,
array([ 60.954998 , 31.354454 , -23.65943 , ..., -10.6828165,
17.584496 , 17.428389 ], dtype=float32) ,
array([80.76036 , 46.995853, 32.998344, ..., 25.247053, 24.72095 ,
38.55709 ], dtype=float32) ,
array([ 57.21983 , 28.900932 , 5.9092135 , ..., -13.230629 ,
-12.073519 , 0.06775343], dtype=float32) ,
array([ 57.9282 , 49.738827, 103.64114 , ..., -20.882639, 15.031132,
-33.411003], dtype=float32) ,
array([ 41.201336 , 55.247692 , 125.30507 , ..., 40.35249 ,
-0.83831096, 49.287106 ], dtype=float32) ,
array([108.18673 , 80.494446 , 54.067287 , ..., 1.435524 ,
-2.7476838, 21.361757 ], dtype=float32) ,
array([237.669 , 112.06154 , 142.08655 , ..., -16.216026, -16.213423,
-19.656635], dtype=float32) ,
array([ 28.101208 , -35.936752 , 14.058266 , ..., 14.527226 ,
42.983494 , 0.21506068], dtype=float32) ,
array([116.53113 , 65.799675 , 14.235068 , ..., 6.5845623,
31.899427 , 25.074394 ], dtype=float32) ,
array([ 14.84813 , 39.64566 , 36.42868 , ..., -19.503736, 33.687115,
28.76964 ], dtype=float32) ,
array([30.701752 , 42.956207 , -2.6014233, ..., 32.189884 , 40.535183 ,
49.050564 ], dtype=float32) ,
array([ -7.5327168, 12.160338 , -13.315258 , ..., -21.417189 ,
4.3943105, 11.573296 ], dtype=float32) ,
array([39.337902, 62.26476 , 75.40785 , ..., 50.53369 , 24.24352 ,
29.571983], dtype=float32) ,
array([ 19.710848 , -41.471203 , -13.2312765, ..., 3.3798163,
13.22497 , 51.939636 ], dtype=float32) ,
array([130.65652 , 113.99321 , 34.97236 , ..., 3.8362186,
-9.070721 , -16.398039 ], dtype=float32) ,
array([100.46639 , 88.224625, 9.426378, ..., 40.757538, 31.033457,
37.431866], dtype=float32) ,
array([ 67.99695 , 45.59686 , 117.89902 , ..., 25.219797 ,
12.333754 , 1.2832373], dtype=float32) ,
array([100.92053 , 130.99886 , 166.41913 , ..., 28.6243 , 31.95243 ,
38.612606], dtype=float32) ,
array([119.38237 , 81.451164, -10.333327, ..., 2.758198, -7.03614 ,
48.164833], dtype=float32) ,
array([48.48864 , 20.540306, 49.95179 , ..., 36.818386, 10.943471,
20.57199 ], dtype=float32) ,
array([ 71.92143 , 27.827488, 121.20353 , ..., 38.70867 , -13.425002,
29.9528 ], dtype=float32) ,
array([43.28724 , 29.515213, 26.95053 , ..., 14.502231, 8.721379,
28.210222], dtype=float32) ,
array([26.776747 , 21.33037 , 43.07099 , ..., 24.487663 ,
0.12759672, -6.3552904 ], dtype=float32) ,
array([43.357307, 11.439277, 13.976952, ..., 25.454199, 15.269275,
47.919006], dtype=float32) ,
array([ 78.11398 , 101.251114, 102.22995 , ..., 12.350644, 25.537058,
48.148273], dtype=float32) ,
array([100.00196 , 45.133945 , 24.946379 , ..., -14.612354 ,
-28.36441 , -7.9822073], dtype=float32) ,
array([ 99.21157 , 20.702877 , 60.509636 , ..., -13.711537 ,
3.2277124, 9.270292 ], dtype=float32) ,
array([ 96.761086 , -22.820654 , 6.9523 , ..., -8.141853 ,
-8.738343 , 0.71418315], dtype=float32) ,
array([68.29123 , 30.098783 , 8.124104 , ..., -9.953464 , -3.2520053,
24.310644 ], dtype=float32) ,
array([64.89854 , 22.229982, 29.74469 , ..., 47.123913, 69.52255 ,
63.991467], dtype=float32) ,
array([59.052444 , 22.234774 , 6.8632364, ..., 5.5614467, 28.648987 ,
-2.5871572], dtype=float32) ,
array([ 4.714474 , 74.27105 , 32.031387 , ..., 51.47795 ,
-18.985905 , 6.6847243], dtype=float32) ,
array([76.036446 , 46.288826 , -5.0629573, ..., 7.7813582, 23.755001 ,
11.599381 ], dtype=float32) ,
array([ 38.234447, -19.218596, 39.138702, ..., 14.257372, -18.217012,
-22.541807], dtype=float32) ,
array([-8.723199, 20.715511, 42.718433, ..., 16.805265, 24.539875,
10.191714], dtype=float32) ,
array([70.5967 , 44.417957, 77.41951 , ..., 3.497371, 42.340523,
71.1179 ], dtype=float32) ,
array([ 75.593956 , 65.16042 , 88.203674 , ..., -17.70723 ,
-2.7536526, 12.768736 ], dtype=float32) ,
array([ -2.6334307, -13.1003475, 25.850649 , ..., -3.553602 ,
4.4820213, 11.690897 ], dtype=float32) ,
array([42.127003 , 24.06413 , 25.821522 , ..., 2.5170922, 1.8855797,
1.9542722], dtype=float32) ,
array([58.086765, 23.779772, 47.5237 , ..., 11.907644, 18.25496 ,
24.309675], dtype=float32) ,
array([ 72.38945 , 31.954533, 35.46369 , ..., -10.249667, -16.023006,
27.165817], dtype=float32) ,
array([-106.98459 , -120.10923 , 431.7519 , ..., 4.5114884,
61.588375 , 5.864098 ], dtype=float32) ,
array([123.15487 , 109.42052 , 65.706 , ..., 5.2877936,
25.434729 , 57.161335 ], dtype=float32) ,
array([ 59.965557 , 40.18299 , 20.441244 , ..., -20.50097 ,
-5.6457067, 6.0677447], dtype=float32) ,
array([25.39954 , 45.98728 , 24.26207 , ..., 30.046774, 20.259043,
59.096497], dtype=float32) ,
array([69.239525, 78.003716, 77.138084, ..., 25.750923, 7.120734,
28.88275 ], dtype=float32) ,
array([ 36.31656 , 12.099432 , 74.85471 , ..., -5.238136 ,
-0.1871349, -15.7159 ], dtype=float32) ,
array([ 5.7002153, -48.396614 , 24.97285 , ..., 25.846664 ,
23.799988 , 31.893925 ], dtype=float32) ,
array([330.82022, 176.19446, 200.9064 , ..., 140.1819 , 147.18802,
141.16 ], dtype=float32) ,
array([ 33.876717, -10.813565, -11.098931, ..., 20.690264, 29.513756,
21.873346], dtype=float32) ,
array([47.810596, 13.080462, 35.86434 , ..., 55.887177, 14.00556 ,
44.542725], dtype=float32) ,
array([17.192295 , 51.882557 , 0.37135446, ..., 33.684788 ,
28.34252 , 37.73443 ], dtype=float32) ,
array([ 17.711315, 73.68319 , 27.467318, ..., -22.03407 , 40.758553,
-14.05209 ], dtype=float32) ,
array([175.21788 , 174.0086 , 218.68466 , ..., 20.458727, 8.300493,
18.97852 ], dtype=float32) ,
array([136.19019 , 88.09276 , 98.77717 , ..., -2.3949533,
-14.143853 , 7.091412 ], dtype=float32) ,
array([73.41861 , 21.028307, 44.776005, ..., 8.080811, 52.38442 ,
56.477287], dtype=float32) ,
array([90.41686 , 88.223656 , 24.646002 , ..., 18.117744 , 2.2793891,
42.726643 ], dtype=float32) ,
array([-13.03471 , 31.05707 , 15.4052515, ..., 13.510451 ,
13.133295 , 51.658314 ], dtype=float32) ,
array([133.68736 , 112.228096, 69.1767 , ..., -24.331465, -7.896012,
-17.585691], dtype=float32) ,
array([ 77.13613 , 14.810299, 28.049625, ..., -10.871936, 26.385994,
33.568344], dtype=float32) ,
array([101.00721 , 59.429127, 108.44532 , ..., 35.44174 , 27.424599,
-17.732237], dtype=float32) ,
array([ 67.18344 , 67.74126 , 104.05215 , ..., 13.14186 , -20.6593 ,
-7.530831], dtype=float32) ,
array([ 73.15871 , 50.318775 , 42.727535 , ..., -31.666119 ,
20.513357 , -2.6553922], dtype=float32) ,
array([72.87559 , 95.119576, 32.433506, ..., 27.698963, 20.805872,
18.668013], dtype=float32) ,
array([ 7.8432713, 20.744352 , -5.7742124, ..., -59.152065 ,
-16.283684 , 0.8741398], dtype=float32) ,
array([67.187294, 24.613565, 19.039267, ..., 23.606321, -3.417026,
19.71134 ], dtype=float32) ,
array([123.90319 , 93.93908 , 93.490265 , ..., 0.56890744,
-23.919552 , 45.132664 ], dtype=float32) ,
array([ -0.15754032, 7.7858863 , -18.863762 , ..., -6.051735 ,
16.332176 , 37.70643 ], dtype=float32) ,
array([127.47097 , 47.274902 , 41.35137 , ..., -2.4639065,
-20.967506 , 24.471956 ], dtype=float32) ,
array([ 84.89507 , 99.943565, 214.93526 , ..., 19.976334, 28.742788,
81.8274 ], dtype=float32) ,
array([53.39871 , 25.378992 , 34.994717 , ..., 11.56144 , 1.1865733,
-5.2332606], dtype=float32) ,
array([77.43302 , 57.608154, 35.885918, ..., 11.779735, 13.329471,
31.273205], dtype=float32) ,
array([41.439194 , 55.89048 , 90.46299 , ..., 36.842022 , 3.0010796,
19.664892 ], dtype=float32) ,
array([59.592953, 38.09869 , 28.365639, ..., -4.956496, 50.046185,
24.11339 ], dtype=float32) ,
array([ 91.22556 , 38.166435, 33.79191 , ..., -34.679836, 5.981435,
-9.197896], dtype=float32) ,
array([56.669483, 16.02393 , 39.01368 , ..., 50.668037, 29.31681 ,
37.33624 ], dtype=float32) ,
array([31.288486, 48.50248 , 38.411236, ..., 17.349613, 24.769352,
30.091293], dtype=float32) ,
array([ 87.72175 , 50.413372, 61.38969 , ..., 23.250679, -23.209608,
-19.284384], dtype=float32) ,
array([101.22931 , 44.975456 , 12.402562 , ..., 6.3223596,
-0.9393209, 49.30059 ], dtype=float32) ,
array([44.942562 , 17.764109 , -3.8525138, ..., 50.02464 , 44.12366 ,
60.690628 ], dtype=float32) ,
array([ 59.20814 , 55.613914, 27.91828 , ..., -19.55956 , 8.29092 ,
10.887796], dtype=float32) ,
array([34.295227, 40.329224, 27.9551 , ..., 46.454773, 49.1931 ,
69.531204], dtype=float32) ,
array([36.315937, 16.00898 , 23.807787, ..., 12.86178 , 15.712359,
36.241283], dtype=float32) ,
array([-11.373059, 19.722734, 67.290306, ..., -7.165212, 9.053778,
34.411457], dtype=float32) ,
array([194.08597 , 109.600555 , 82.694244 , ..., 24.634703 ,
-0.36928344, 12.418137 ], dtype=float32) ,
array([101.313965, 119.71282 , 130.68394 , ..., 13.80005 , 28.10153 ,
50.103584], dtype=float32) ,
array([64.63078 , 11.5607605, 46.99132 , ..., 10.160641 , 20.685055 ,
-4.3322005], dtype=float32) ,
array([197.16518 , 137.81369 , 151.69016 , ..., 93.813934, 135.25934 ,
173.53221 ], dtype=float32) ,
array([ 79.66366 , 65.36527 , 103.68922 , ..., 12.59105 ,
4.5669346, 17.350101 ], dtype=float32) ,
array([75.899666 , 63.157513 , 65.33133 , ..., -6.027305 , 1.8957654,
35.439938 ], dtype=float32) ,
array([118.971115, 213.64085 , 244.43103 , ..., 399.9716 , 283.28424 ,
450.00113 ], dtype=float32) ,
array([37.606575 , 55.526684 , -6.727203 , ..., 4.279816 , 6.3283763,
-3.4255786], dtype=float32) ,
array([50.402527 , 50.470436 , 74.56985 , ..., 3.7161267, 3.695714 ,
32.50184 ], dtype=float32) ,
array([88.14448 , 38.538433 , 56.71485 , ..., 8.347698 , -4.6040545,
3.8007746], dtype=float32) ,
array([ 43.81699 , 6.0477796, -40.04479 , ..., 56.14445 ,
23.531214 , 32.211338 ], dtype=float32) ,
array([47.996475 , 23.217466 , 43.313095 , ..., -6.5125985, 4.0764008,
15.212245 ], dtype=float32) ,
array([ 50.86098 , -16.722073, -49.73877 , ..., 18.018206, 14.292349,
15.629646], dtype=float32) ,
array([ -4.5171566, -12.38693 , 9.131368 , ..., 27.306553 ,
39.90766 , 45.29034 ], dtype=float32) ,
array([64.283516 , 48.341408 , 50.41997 , ..., -4.0912414, 1.0885363,
11.414934 ], dtype=float32) ,
array([71.455345, 70.28768 , 79.49021 , ..., 34.40259 , 12.045274,
33.09065 ], dtype=float32) ,
array([102.18409 , 109.295685 , 104.87101 , ..., -16.896778 ,
16.433657 , -7.8815184], dtype=float32) ,
array([98.77656 , 47.87196 , 51.92575 , ..., 37.04617 , 46.86966 ,
24.138018], dtype=float32) ,
array([70.01204 , 45.532265, 83.10735 , ..., -5.580532, 14.368292,
16.913284], dtype=float32) ,
array([97.79851 , 89.1026 , 57.037685 , ..., 17.480164 , 3.3304052,
8.430007 ], dtype=float32) ,
array([-12.16726 , -78.80997 , -11.505411, ..., -35.295994, 5.180776,
-71.18394 ], dtype=float32) ,
array([99.59899 , 90.554436, 92.35792 , ..., 28.075838, 23.272572,
35.64472 ], dtype=float32) ,
array([83.29214 , 76.66511 , 53.969517, ..., 19.533796, 22.250977,
25.362755], dtype=float32) ],
dtype=object)
np.vstack(F).shape
(452, 40000)
oracles = (nda.Oracle & scan_key).fetch('pearson')
fig, ax = plt.subplots()
ax.hist(oracles, bins=50, color='k');
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
high_oracle_percentile = np.percentile(oracles, 99)
high_oracle_percentile
0.54185948
high_oracle_table = nda.Oracle & scan_key & f'pearson>{high_oracle_percentile}'
high_oracle_table
| session Session ID | scan_idx Scan ID | unit_id unique per scan | trials number of trials used | pearson per unit oracle pearson correlation over all movies |
|---|---|---|---|---|
| 4 | 7 | 130 | 60 | 0.623745 |
| 4 | 7 | 327 | 60 | 0.61131 |
| 4 | 7 | 493 | 60 | 0.54457 |
| 4 | 7 | 688 | 60 | 0.561252 |
| 4 | 7 | 756 | 60 | 0.617953 |
| 4 | 7 | 775 | 60 | 0.638734 |
| 4 | 7 | 795 | 60 | 0.613519 |
| 4 | 7 | 907 | 60 | 0.574646 |
| 4 | 7 | 1070 | 60 | 0.553697 |
| 4 | 7 | 1177 | 60 | 0.57389 |
| 4 | 7 | 1262 | 60 | 0.594857 |
| 4 | 7 | 1552 | 60 | 0.593425 |
...
Total: 75
unit_key = high_oracle_table.fetch('KEY', offset=60, limit=1)[0]
unit_key
{'session': 4, 'scan_idx': 7, 'unit_id': 5819}
oracle_traces, score = func.fetch_oracle_raster(unit_key)
fig,axes = plt.subplots(1,6, figsize=(6,1),dpi=300)
for col,clip_trace in zip(axes,np.moveaxis(oracle_traces,1,0)):
col.imshow(clip_trace,cmap='binary', interpolation='nearest')
col.set_aspect('auto')
col.set_xticks([])
col.set_yticks([])
axes[0].set_ylabel(f'oracle score: {score:.2f}', fontsize=5)
fig.subplots_adjust(wspace=.05)
[ax.set_title(f'oracle clip {i+1}', fontsize=6) for i, ax in enumerate(axes)];
fig.suptitle(f'session: {unit_key["session"]}, scan_idx: {unit_key["scan_idx"]}, unit_id: {unit_key["unit_id"]}', fontsize=7, y=1.2)
Text(0.5, 1.2, 'session: 4, scan_idx: 7, unit_id: 5819')
nda.Activity() & unit_key
| session Session ID | scan_idx Scan ID | unit_id unique per scan | trace spike trace |
|---|---|---|---|
| 4 | 7 | 5819 | =BLOB= |
Total: 1
spike_trace = (nda.Activity() & unit_key).fetch1('trace')
fig, ax = plt.subplots(figsize=(10, 3), dpi=150)
ax.plot(spike_trace, c='k')
ax.set_xlabel('Frames')
ax.set_ylabel('Spike trace')
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
nda.Fluorescence & (nda.ScanUnit & unit_key)
| session Session ID | scan_idx Scan ID | field Field Number | mask_id mask ID, unique per field | trace fluorescence trace |
|---|---|---|---|---|
| 4 | 7 | 6 | 460 | =BLOB= |
Total: 1
calcium_trace = (nda.Fluorescence & (nda.ScanUnit & unit_key)).fetch1('trace')
fig, ax = plt.subplots(figsize=(10, 3), dpi=150)
ax.plot(calcium_trace/ np.max(calcium_trace), c='g', alpha=0.5, label='calcium')
ax.plot(spike_trace/ np.max(spike_trace), c='k', label='spike', alpha=0.5)
ax.set_xlabel('Frames')
ax.legend()
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
# lets zoom in to see the relationship more clearly
fig, ax = plt.subplots(figsize=(10, 3), dpi=150)
ax.plot(calcium_trace[4000:4500]/ np.max(calcium_trace), c='g', alpha=0.5, label='Fluorscence')
ax.plot(spike_trace[4000:4500]/ np.max(spike_trace), c='k', label='Activity', alpha=0.5)
ax.set_xlabel('Frames')
ax.set_ylabel('Aribtrary Units')
ax.legend()
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
import caveclient
client = caveclient.CAVEclient('minnie65_public_v343')
cr_df = client.materialize.query_table('functional_coreg')
cr_df.head()
| id | valid | pt_supervoxel_id | pt_root_id | session | scan_idx | unit_id | pt_position | |
|---|---|---|---|---|---|---|---|---|
| 0 | 1 | t | 102531727972419182 | 864691136136642173 | 4 | 7 | 665 | [274864, 94064, 22046] |
| 1 | 2 | t | 94792540099826672 | 864691136208993724 | 4 | 7 | 740 | [218320, 104320, 19016] |
| 2 | 4 | t | 93946810036875732 | 864691135683934135 | 4 | 7 | 782 | [212128, 94544, 23423] |
| 3 | 5 | t | 84730565597057981 | 864691135334528233 | 4 | 7 | 855 | [145158, 110036, 19355] |
| 4 | 6 | t | 110905058841147285 | 864691136309730650 | 4 | 7 | 921 | [335744, 90128, 22805] |
coreg_scan_units_top50 = pd.DataFrame(nda.ScanUnit() & cr_df.head(50))
coreg_scan_units_top50.head()
| session | scan_idx | unit_id | field | mask_id | um_x | um_y | um_z | px_x | px_y | ms_delay | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 4 | 7 | 665 | 2 | 22 | 160 | -308 | 80 | 150 | 191 | 27 |
| 1 | 4 | 7 | 740 | 2 | 97 | 37 | -78 | 80 | 101 | 283 | 31 |
| 2 | 4 | 7 | 782 | 2 | 139 | 229 | -15 | 80 | 177 | 308 | 32 |
| 3 | 4 | 7 | 855 | 2 | 212 | 65 | 249 | 80 | 112 | 413 | 37 |
| 4 | 4 | 7 | 921 | 2 | 278 | 190 | -578 | 80 | 162 | 83 | 23 |
print(len(coreg_scan_units_top50))
50
first5_fluorescence=(nda.Fluorescence & coreg_scan_units_top50).fetch('trace')
# this comes back as array of arrays
# lets make it a matrix
first5_flourescence = np.vstack(first5_fluorescence)
first5_flourescence.shape
(50, 40000)
# lets plot the raw values for the first 200 frames
f, ax = plt.subplots()
lines=ax.plot(first5_flourescence.T[0:2000,:])
ax.set_xlabel('frames')
ax.set_ylabel('fluorescence (AU)')
Text(0, 0.5, 'fluorescence (AU)')
Exercise 1: Plot the fluorescence and activity trace of the highest oracle scoring proofread layer 2/3 pyramidal cell
# merge proofreading status and cell type predictions to find an extended axons of the right type
prf_df = client.materialize.query_table('proofreading_status_public_release',
filter_equal_dict={'status_axon':'extended'})
ct_df = client.materialize.query_table('aibs_soma_nuc_metamodel_preds_v117',
filter_equal_dict={'cell_type':'23P'})
dfm = pd.merge(prf_df, ct_df, on='pt_root_id', how='inner')
dfm.shape
(28, 20)
# merge in the co-registration to find which are coregistered.
coreg_df = client.materialize.query_table('functional_coreg')
dfm2 = pd.merge(dfm, coreg_df, on='pt_root_id', how='inner')
dfm2.shape
(37, 27)
# use datajoint to find the oracle scores for these units
oracle_score_df = pd.DataFrame(nda.Oracle() & dfm2)
oracle_score_df
| session | scan_idx | unit_id | trials | pearson | |
|---|---|---|---|---|---|
| 0 | 4 | 7 | 3454 | 60 | 0.347168 |
| 1 | 4 | 7 | 3533 | 60 | 0.389768 |
| 2 | 4 | 7 | 3633 | 60 | 0.389276 |
| 3 | 4 | 7 | 3634 | 60 | 0.377085 |
| 4 | 4 | 7 | 3753 | 60 | 0.396725 |
| 5 | 5 | 3 | 1494 | 60 | 0.245851 |
| 6 | 5 | 3 | 2300 | 60 | 0.195357 |
| 7 | 5 | 3 | 2528 | 60 | 0.246312 |
| 8 | 5 | 6 | 2365 | 60 | 0.400285 |
| 9 | 5 | 7 | 2529 | 60 | 0.389749 |
| 10 | 6 | 2 | 2464 | 60 | 0.149385 |
| 11 | 6 | 4 | 2313 | 60 | 0.295697 |
| 12 | 6 | 4 | 4754 | 60 | 0.552235 |
| 13 | 6 | 4 | 4805 | 60 | 0.503934 |
| 14 | 6 | 6 | 3607 | 60 | 0.269975 |
| 15 | 6 | 6 | 4310 | 60 | 0.341804 |
| 16 | 6 | 7 | 3657 | 60 | 0.366028 |
| 17 | 6 | 7 | 4548 | 60 | 0.137352 |
| 18 | 7 | 3 | 1469 | 60 | 0.336497 |
| 19 | 7 | 3 | 1847 | 60 | 0.175136 |
| 20 | 7 | 4 | 2705 | 60 | 0.253142 |
| 21 | 7 | 4 | 5849 | 60 | 0.413953 |
| 22 | 7 | 5 | 1505 | 60 | 0.134061 |
| 23 | 7 | 5 | 2220 | 60 | 0.319839 |
| 24 | 7 | 5 | 2237 | 60 | 0.467668 |
| 25 | 7 | 5 | 2245 | 60 | 0.357210 |
| 26 | 7 | 5 | 4171 | 60 | 0.416111 |
| 27 | 7 | 5 | 4749 | 60 | 0.644044 |
| 28 | 7 | 5 | 4795 | 60 | 0.351339 |
| 29 | 8 | 5 | 2039 | 60 | 0.419923 |
| 30 | 8 | 5 | 2491 | 60 | 0.452308 |
| 31 | 8 | 5 | 4960 | 60 | 0.435012 |
| 32 | 8 | 5 | 5031 | 60 | 0.301440 |
| 33 | 8 | 5 | 5094 | 60 | 0.286198 |
| 34 | 9 | 4 | 2058 | 60 | 0.334003 |
| 35 | 9 | 4 | 5224 | 60 | 0.337876 |
| 36 | 9 | 4 | 7086 | 60 | 0.305401 |
# find the unit with the highest oracle score
oracle_score_df.sort_values('pearson', ascending=False)
| session | scan_idx | unit_id | trials | pearson | |
|---|---|---|---|---|---|
| 27 | 7 | 5 | 4749 | 60 | 0.644044 |
| 12 | 6 | 4 | 4754 | 60 | 0.552235 |
| 13 | 6 | 4 | 4805 | 60 | 0.503934 |
| 24 | 7 | 5 | 2237 | 60 | 0.467668 |
| 30 | 8 | 5 | 2491 | 60 | 0.452308 |
| 31 | 8 | 5 | 4960 | 60 | 0.435012 |
| 29 | 8 | 5 | 2039 | 60 | 0.419923 |
| 26 | 7 | 5 | 4171 | 60 | 0.416111 |
| 21 | 7 | 4 | 5849 | 60 | 0.413953 |
| 8 | 5 | 6 | 2365 | 60 | 0.400285 |
| 4 | 4 | 7 | 3753 | 60 | 0.396725 |
| 1 | 4 | 7 | 3533 | 60 | 0.389768 |
| 9 | 5 | 7 | 2529 | 60 | 0.389749 |
| 2 | 4 | 7 | 3633 | 60 | 0.389276 |
| 3 | 4 | 7 | 3634 | 60 | 0.377085 |
| 16 | 6 | 7 | 3657 | 60 | 0.366028 |
| 25 | 7 | 5 | 2245 | 60 | 0.357210 |
| 28 | 7 | 5 | 4795 | 60 | 0.351339 |
| 0 | 4 | 7 | 3454 | 60 | 0.347168 |
| 15 | 6 | 6 | 4310 | 60 | 0.341804 |
| 35 | 9 | 4 | 5224 | 60 | 0.337876 |
| 18 | 7 | 3 | 1469 | 60 | 0.336497 |
| 34 | 9 | 4 | 2058 | 60 | 0.334003 |
| 23 | 7 | 5 | 2220 | 60 | 0.319839 |
| 36 | 9 | 4 | 7086 | 60 | 0.305401 |
| 32 | 8 | 5 | 5031 | 60 | 0.301440 |
| 11 | 6 | 4 | 2313 | 60 | 0.295697 |
| 33 | 8 | 5 | 5094 | 60 | 0.286198 |
| 14 | 6 | 6 | 3607 | 60 | 0.269975 |
| 20 | 7 | 4 | 2705 | 60 | 0.253142 |
| 7 | 5 | 3 | 2528 | 60 | 0.246312 |
| 5 | 5 | 3 | 1494 | 60 | 0.245851 |
| 6 | 5 | 3 | 2300 | 60 | 0.195357 |
| 19 | 7 | 3 | 1847 | 60 | 0.175136 |
| 10 | 6 | 2 | 2464 | 60 | 0.149385 |
| 17 | 6 | 7 | 4548 | 60 | 0.137352 |
| 22 | 7 | 5 | 1505 | 60 | 0.134061 |
unit_key={'session':7, 'scan_idx':5, 'unit_id':4754}
# pull out its fluorescence
F=((nda.ScanUnit()&unit_key)*nda.Fluorescence).fetch1('trace')
# pull out its activity
act=((nda.ScanUnit()&unit_key)*nda.Activity()).fetch1('trace')
# plot them together
# lets zoom in to see the relationship more clearly
fig, ax = plt.subplots(figsize=(10, 3), dpi=150)
ax.plot(F[4000:4500], c='g', alpha=0.5, label='Fluorscence')
#ax.plot(act[4000:4500]/ np.max(act), c='k', label='Activity', alpha=0.5)
ax.set_xlabel('Frames')
ax.set_ylabel('Aribtrary Units')
ax.legend()
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
Exercise 2: Find the ScanUnits within a field with the largest average response to the monet stimulus in a scan. Find out which of these are coregistered to the structural data. Which direction has the largest response? How consistent is that response across other monet stimuli with the same directions?
# filter out the Trial table for the unit you selected in Exercise 1 and the Monet type
nda.ScanUnit() & field_key
| session Session ID | scan_idx Scan ID | unit_id unique per scan | field Field Number | mask_id mask id unique per field | um_x centroid x motor coordinates (microns) | um_y centroid y motor coordinates (microns) | um_z centroid z motor coordinates (microns) | px_x centroid x pixel coordinate in field (pixels) | px_y centroid y pixel coordinate in field (pixels) | ms_delay delay from start of frame (field 1 pixel 1) to recording of this unit (milliseconds) |
|---|---|---|---|---|---|---|---|---|---|---|
| 4 | 7 | 2551 | 4 | 1 | -180 | -780 | 220 | 14 | 2 | 58 |
| 4 | 7 | 2552 | 4 | 2 | -109 | -758 | 220 | 42 | 11 | 58 |
| 4 | 7 | 2553 | 4 | 3 | -21 | -750 | 220 | 77 | 14 | 59 |
| 4 | 7 | 2554 | 4 | 4 | 16 | -738 | 220 | 93 | 19 | 59 |
| 4 | 7 | 2555 | 4 | 5 | 48 | -751 | 220 | 105 | 14 | 59 |
| 4 | 7 | 2556 | 4 | 6 | 88 | -755 | 220 | 121 | 12 | 59 |
| 4 | 7 | 2557 | 4 | 7 | 99 | -754 | 220 | 126 | 13 | 59 |
| 4 | 7 | 2558 | 4 | 8 | 124 | -750 | 220 | 136 | 14 | 59 |
| 4 | 7 | 2559 | 4 | 9 | 137 | -763 | 220 | 141 | 9 | 58 |
| 4 | 7 | 2560 | 4 | 10 | 117 | -782 | 220 | 133 | 1 | 58 |
| 4 | 7 | 2561 | 4 | 11 | 162 | -778 | 220 | 151 | 3 | 58 |
| 4 | 7 | 2562 | 4 | 12 | 169 | -749 | 220 | 153 | 14 | 59 |
...
Total: 1389
# pick a field key
field_key
{'session': 4, 'scan_idx': 7, 'field': 4}
# pick out the fluorescence for these units as a N x 40000 matrix
fluor=(nda.ScanUnit() & field_key) * nda.Fluorescence()
F =np.vstack(fluor.fetch('trace'))
# pick out the activity for these units as a N x 40000 matrix
act=(nda.ScanUnit() & field_key) * nda.Activity()
A =np.vstack(act.fetch('trace'))
F.shape, A.shape
((1389, 40000), (1389, 40000))
# get the frame times for the scan
frame_times=(nda.FrameTimes()&field_key).fetch1('frame_times')
# get the monet trials for this frame from the Trial table as a dataframe
monet_trials=pd.DataFrame((nda.Trial() & field_key & {'type':'stimulus.Monet2'}))
monet_trials.head()
| session | scan_idx | trial_idx | type | start_idx | end_idx | start_frame_time | end_frame_time | frame_times | condition_hash | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 4 | 7 | 6 | stimulus.Monet2 | 436 | 530 | 69.112716 | 84.095809 | [69.11271565244505, 69.12939541623899, 69.1460... | DKYV7TrfEl+C8nvadH+1 |
| 1 | 4 | 7 | 7 | stimulus.Monet2 | 531 | 625 | 84.179131 | 99.162216 | [84.17913143918821, 84.19580333516905, 84.2124... | +rgSVBVRE8Ij1WNhq8ZW |
| 2 | 4 | 7 | 8 | stimulus.Monet2 | 626 | 720 | 99.245546 | 114.228632 | [99.24554627225706, 99.26221435354063, 99.2788... | GHn0W57E+2PS+Qr5yD2r |
| 3 | 4 | 7 | 9 | stimulus.Monet2 | 721 | 815 | 114.311966 | 129.295058 | [114.31196635053465, 114.32862942502805, 114.3... | u0ftbdrw9UHzSHDe1o4f |
| 4 | 4 | 7 | 88 | stimulus.Monet2 | 6139 | 6233 | 974.497840 | 989.480919 | [974.4978403358252, 974.5145055560859, 974.531... | WdUz9wrTqcT0KJgVrQeF |
# loop over the monet trials and sum the fluorescence during the monet trials across time
# collect the mean of these responses for neurons in the field
monet_responses = []
for k,trial in monet_trials.iterrows():
Fclip=np.mean(F[:, trial.start_idx:trial.end_idx], axis=1)
monet_responses.append(Fclip)
monet_responses=np.vstack(monet_responses)
monet_responses.shape
(40, 1389)
# plot the responses across the monet Trials
f,ax = plt.subplots()
lines=ax.plot(monet_responses.T)
ax.set_xlabel('neuron')
ax.set_ylabel('summed F')
Text(0, 0.5, 'summed F')
# order the neurons by their mean response across trials.
# use this to pick out the index of the kth most responsive neuron
mean_response = np.mean(monet_responses, axis=0)
max_neuron = np.argsort(mean_response)[-10]
max_neuron
1238
# plot this neuron across the monet trials
plt.plot(monet_responses[:,max_neuron])
plt.xlabel('monet trials')
plt.ylabel('avg fluorescence')
Text(0, 0.5, 'avg fluorescence')
# plot out the raw fluorescence data from one of the highly responsive trials
high_trial=monet_trials.loc[2,:]
f, ax = plt.subplots()
high_trial_F = F[max_neuron, high_trial.start_idx:high_trial.end_idx]
ax.plot(high_trial_F)
ax.set_xlabel('frames')
ax.set_ylabel('fluorescence')
# plot out the activity data from that same highly responsive trials
high_trial_A = A[max_neuron, high_trial.start_idx:high_trial.end_idx]
f, ax = plt.subplots()
ax.plot(high_trial_A)
ax.set_xlabel('frames')
ax.set_ylabel('activity')
Text(0, 0.5, 'activity')
# cutout each of the directions, reorder them
#and plot the fluorescence by direction
# first construct the directions dataframe as we did above for this trial
# hint, filter on nda.Monet2 with the high trial row converted to a dictionary
monet_info = nda.Monet2& high_trial.to_dict()
directions, onsets = monet_info.fetch1('directions', 'onsets')
directions_df = pd.DataFrame({'onset': onsets[0,:], 'direction':directions[0,:]})
duration = float(monet_info.fetch1('duration'))
offsets = np.concatenate([directions_df['onset'][1:],[duration]])
directions_df['offset']=offsets
directions_df['onset_time']=directions_df['onset']+high_trial['start_frame_time']
directions_df['offset_time']=directions_df['offset']+high_trial['start_frame_time']
directions_df['onset_frame_number']=np.searchsorted(frame_times, directions_df.onset_time)
directions_df['offset_frame_number']=np.searchsorted(frame_times, directions_df.offset_time)
# sort the times with respect to directions
directions_df.sort_values('direction', inplace=True)
directions_df
| onset | direction | offset | onset_time | offset_time | onset_frame_number | offset_frame_number | |
|---|---|---|---|---|---|---|---|
| 13 | 12.1875 | 0.0 | 13.1250 | 111.433046 | 112.370546 | 703 | 708 |
| 6 | 5.6250 | 22.5 | 6.5625 | 104.870546 | 105.808046 | 661 | 667 |
| 3 | 2.8125 | 45.0 | 3.7500 | 102.058046 | 102.995546 | 643 | 649 |
| 4 | 3.7500 | 67.5 | 4.6875 | 102.995546 | 103.933046 | 649 | 655 |
| 1 | 0.9375 | 90.0 | 1.8750 | 100.183046 | 101.120546 | 632 | 638 |
| 11 | 10.3125 | 112.5 | 11.2500 | 109.558046 | 110.495546 | 691 | 697 |
| 15 | 14.0625 | 135.0 | 15.0000 | 113.308046 | 114.245546 | 714 | 720 |
| 12 | 11.2500 | 157.5 | 12.1875 | 110.495546 | 111.433046 | 697 | 703 |
| 2 | 1.8750 | 180.0 | 2.8125 | 101.120546 | 102.058046 | 638 | 643 |
| 0 | 0.0000 | 202.5 | 0.9375 | 99.245546 | 100.183046 | 626 | 632 |
| 7 | 6.5625 | 225.0 | 7.5000 | 105.808046 | 106.745546 | 667 | 673 |
| 14 | 13.1250 | 247.5 | 14.0625 | 112.370546 | 113.308046 | 708 | 714 |
| 9 | 8.4375 | 270.0 | 9.3750 | 107.683046 | 108.620546 | 679 | 685 |
| 8 | 7.5000 | 292.5 | 8.4375 | 106.745546 | 107.683046 | 673 | 679 |
| 5 | 4.6875 | 315.0 | 5.6250 | 103.933046 | 104.870546 | 655 | 661 |
| 10 | 9.3750 | 337.5 | 10.3125 | 108.620546 | 109.558046 | 685 | 691 |
# now loop through the directions and cutout the fluorescence and activity
# plot both, normalizing by the maximum seen in this trial
f, ax = plt.subplots(len(directions_df),1,figsize=(4,12))
n=0
for k,offsets in directions_df[['onset_frame_number', 'offset_frame_number']].iterrows():
ax[n].plot(F[max_neuron, offsets['onset_frame_number']:offsets['offset_frame_number']]/np.max(high_trial_F))
ax[n].plot(A[max_neuron, offsets['onset_frame_number']:offsets['offset_frame_number']]/np.max(high_trial_A))
ax[n].set_ylim(0, 1)
n+=1
intensities = (nda.MeanIntensity & field_key).fetch1('intensities')
fig, ax = plt.subplots(figsize=(10, 3), dpi=150)
ax.plot(intensities, c='b', alpha=0.5)
ax.set_xlabel('Frames')
ax.set_ylabel('Field Mean Intensity')
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
nda.RawManualPupil() & scan_key
| session Session ID | scan_idx Scan ID | pupil_min_r vector of pupil minor radii synchronized with field 1 frame times (pixels) | pupil_maj_r vector of pupil major radii synchronized with field 1 frame times (pixels) | pupil_x vector of pupil x positions synchronized with field 1 frame times (pixels) | pupil_y vector of pupil y positions synchronized with field 1 frame times (pixels) | pupil_times vector of timestamps relative to scan start (seconds) |
|---|---|---|---|---|---|---|
| 4 | 7 | =BLOB= | =BLOB= | =BLOB= | =BLOB= | =BLOB= |
Total: 1
nda.ManualPupil & scan_key
| session Session ID | scan_idx Scan ID | pupil_min_r vector of pupil minor radii synchronized with field 1 frame times (pixels) | pupil_maj_r vector of pupil major radii synchronized with field 1 frame times (pixels) | pupil_x vector of pupil x positions synchronized with field 1 frame times (pixels) | pupil_y vector of pupil y positions synchronized with field 1 frame times (pixels) |
|---|---|---|---|---|---|
| 4 | 7 | =BLOB= | =BLOB= | =BLOB= | =BLOB= |
Total: 1
nda.RawTreadmill & scan_key
| session Session ID | scan_idx Scan ID | treadmill_velocity vector of treadmill velocities (cm/s) | treadmill_timestamps vector of times relative to scan start (seconds) |
|---|---|---|---|
| 4 | 7 | =BLOB= | =BLOB= |
Total: 1
nda.Treadmill & scan_key
| session Session ID | scan_idx Scan ID | treadmill_velocity vector of treadmill velocities synchronized with field 1 frame times (cm/s) |
|---|---|---|
| 4 | 7 | =BLOB= |
Total: 1
nda.AreaMembership()
| session Session ID | scan_idx Scan ID | unit_id unique per scan | brain_area Visual area membership of unit |
|---|---|---|---|
| 4 | 7 | 1 | LM |
| 4 | 7 | 2 | LM |
| 4 | 7 | 3 | LM |
| 4 | 7 | 4 | LM |
| 4 | 7 | 5 | LM |
| 4 | 7 | 6 | LM |
| 4 | 7 | 7 | LM |
| 4 | 7 | 8 | LM |
| 4 | 7 | 9 | LM |
| 4 | 7 | 10 | LM |
| 4 | 7 | 11 | LM |
| 4 | 7 | 12 | LM |
...
Total: 168971
area, x, y = (nda.AreaMembership * nda.StackUnit).fetch('brain_area', 'stack_x', 'stack_y')
color_dict = {'LM':'blue', 'AL': 'green', 'RL': 'purple', 'V1': 'red'}
fig, ax = plt.subplots(dpi=200)
ax.scatter(x, y, color=[color_dict[a] for a in area], s=1)
ax.set_aspect('equal')
ax.invert_yaxis()
ax.set_xlabel('2P stack x-axis')
ax.set_ylabel('2P stack y-axis')
ax.annotate('LM', (500, 300))
ax.annotate('AL', (900, 150))
ax.annotate('RL', (1100, 350))
ax.annotate('V1', (800, 600))
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)